hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
48f41747a3d58f3d1a448281f5a63064e6b8c97f | 203 | py | Python | lab02/sum.py | gddmatos/iaed21 | 8bfe153d27b4bc579c4fce94f330ba1b87046f0b | [
"MIT"
] | 10 | 2021-03-01T12:37:47.000Z | 2022-03-06T14:08:18.000Z | lab02/sum.py | gddmatos/iaed21 | 8bfe153d27b4bc579c4fce94f330ba1b87046f0b | [
"MIT"
] | null | null | null | lab02/sum.py | gddmatos/iaed21 | 8bfe153d27b4bc579c4fce94f330ba1b87046f0b | [
"MIT"
] | 16 | 2021-03-19T18:29:29.000Z | 2021-09-17T17:13:19.000Z | #!/usr/bin/python
# vim: set fileencoding=UTF-8
sum = 0
a = input("? ")
while a.lstrip('-').isdigit() :
sum = sum + int(a)
a = input("? ")
print(sum)
# end with a non-integer value: 1. (for example)
| 20.3 | 48 | 0.596059 |
64e9e4afd52b7e1ef990d4bb82a5fbc7e728fff2 | 93 | py | Python | src/auditlog/__init__.py | alasco-tech/django-auditlog | 36eab26779bc8b8cf0b57d0007b73c7ad8ba8b67 | [
"MIT"
] | 3 | 2018-03-19T07:21:08.000Z | 2020-07-01T15:23:32.000Z | src/auditlog/__init__.py | alasco-tech/django-auditlog | 36eab26779bc8b8cf0b57d0007b73c7ad8ba8b67 | [
"MIT"
] | 23 | 2020-02-12T02:35:49.000Z | 2022-02-11T03:45:40.000Z | src/auditlog/__init__.py | alasco-tech/django-auditlog | 36eab26779bc8b8cf0b57d0007b73c7ad8ba8b67 | [
"MIT"
] | 5 | 2020-04-25T15:04:27.000Z | 2020-08-28T10:47:20.000Z | from __future__ import unicode_literals
default_app_config = 'auditlog.apps.AuditlogConfig'
| 23.25 | 51 | 0.860215 |
401c005e257d317327e7d2ccc515e1b1c4f9f003 | 11,219 | py | Python | fpakman/view/qt/thread.py | vinifmor/fpakman | a719991b8f7ecf366d44fdf074f5950767bdf121 | [
"Zlib"
] | 39 | 2019-06-15T08:27:12.000Z | 2021-11-08T03:33:01.000Z | fpakman/view/qt/thread.py | vinifmor/fpakman | a719991b8f7ecf366d44fdf074f5950767bdf121 | [
"Zlib"
] | 10 | 2019-06-16T12:16:19.000Z | 2020-06-21T18:49:05.000Z | fpakman/view/qt/thread.py | vinifmor/fpakman | a719991b8f7ecf366d44fdf074f5950767bdf121 | [
"Zlib"
] | 3 | 2019-08-01T12:38:46.000Z | 2020-04-30T20:40:23.000Z | import subprocess
import time
from datetime import datetime, timedelta
from typing import List
import requests
from PyQt5.QtCore import QThread, pyqtSignal
from fpakman.core.controller import ApplicationManager
from fpakman.core.exception import NoInternetException
from fpakman.core.model import ApplicationStatus
fro... | 30.736986 | 137 | 0.612176 |
c8f6e362bd7d5e598cffda759314e3ae185bd628 | 277 | py | Python | samples/kitchen-sink-on-aws/glue/hello/hello_world.py | ihafidh/dataops-infra | 7dd73534fac9e7aeb2fea0d546c583aa2ca6e1f3 | [
"MIT"
] | 12 | 2020-02-29T03:54:54.000Z | 2020-12-03T08:16:04.000Z | samples/kitchen-sink-on-aws/glue/hello/hello_world.py | ihafidh/dataops-infra | 7dd73534fac9e7aeb2fea0d546c583aa2ca6e1f3 | [
"MIT"
] | 99 | 2019-12-08T19:54:30.000Z | 2020-12-27T01:30:58.000Z | samples/kitchen-sink-on-aws/glue/hello/hello_world.py | ihafidh/dataops-infra | 7dd73534fac9e7aeb2fea0d546c583aa2ca6e1f3 | [
"MIT"
] | 30 | 2020-02-27T20:58:37.000Z | 2020-10-30T14:13:52.000Z | import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
glueContext = GlueContext(SparkContext.getOrCreate())
print("Hello, World!")
| 25.181818 | 53 | 0.830325 |
966beb973f6ccb93f7fc3e24092c65871311251a | 8,970 | py | Python | planar_magnetics/inductors/cffc.py | dzimmanck/KiCad-CFFC-Inductor | 7d28b9ecfd2d2f64c9412a1fbaeae4d930a760ac | [
"Apache-2.0"
] | 2 | 2022-03-29T03:18:40.000Z | 2022-03-30T16:48:41.000Z | planar_magnetics/inductors/cffc.py | dzimmanck/KiCad-CFFC-Inductor | 7d28b9ecfd2d2f64c9412a1fbaeae4d930a760ac | [
"Apache-2.0"
] | 1 | 2022-03-28T22:54:09.000Z | 2022-03-28T22:54:09.000Z | planar_magnetics/inductors/cffc.py | dzimmanck/KiCad-CFFC-Inductor | 7d28b9ecfd2d2f64c9412a1fbaeae4d930a760ac | [
"Apache-2.0"
] | null | null | null | import math
from planar_magnetics.geometry import Point
from planar_magnetics.cores import Core
from planar_magnetics.creepage import Classification, calculate_creepage
from planar_magnetics.kicad import Footprint, Pad, PadType, Reference, Value
from planar_magnetics.windings.single import TopTurn, InnerTurn, BottomTur... | 33.595506 | 135 | 0.604794 |
676797d592ca0eb3c176d59c6dd949d9d70c7f70 | 1,327 | py | Python | lucid/optvis/param/images.py | gabgoh/lucid | 643844807a41ac3bd9b972cdfb0a3f793c9c2d11 | [
"Apache-2.0"
] | 18 | 2019-02-04T20:57:37.000Z | 2021-03-30T17:05:21.000Z | lucid/optvis/param/images.py | gabgoh/lucid | 643844807a41ac3bd9b972cdfb0a3f793c9c2d11 | [
"Apache-2.0"
] | 2 | 2021-09-19T06:54:17.000Z | 2022-01-23T02:49:06.000Z | lucid/optvis/param/images.py | gabgoh/lucid | 643844807a41ac3bd9b972cdfb0a3f793c9c2d11 | [
"Apache-2.0"
] | 16 | 2019-02-11T22:05:23.000Z | 2021-09-19T06:53:42.000Z | # Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 35.864865 | 83 | 0.669179 |
cfaaf991002f1282cfc68c7e14782069f3696b42 | 7,661 | py | Python | apex/optimizers/fused_adam.py | oyj0594/apex | b66ffc1d952d0b20d6706ada783ae5b23e4ee734 | [
"BSD-3-Clause"
] | 23 | 2019-01-14T09:45:28.000Z | 2021-05-22T02:25:41.000Z | apex/optimizers/fused_adam.py | oyj0594/apex | b66ffc1d952d0b20d6706ada783ae5b23e4ee734 | [
"BSD-3-Clause"
] | 4 | 2021-06-08T21:14:36.000Z | 2022-03-12T00:23:24.000Z | apex/optimizers/fused_adam.py | oyj0594/apex | b66ffc1d952d0b20d6706ada783ae5b23e4ee734 | [
"BSD-3-Clause"
] | 12 | 2019-05-22T10:13:55.000Z | 2022-01-05T05:20:23.000Z | import torch
from apex.multi_tensor_apply import multi_tensor_applier
class FusedAdam(torch.optim.Optimizer):
"""Implements Adam algorithm.
Currently GPU-only. Requires Apex to be installed via
``pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./``.
This versi... | 44.283237 | 151 | 0.551364 |
2a1706a3aeaa5c3b4efed883275cc6f967dcddce | 6,392 | py | Python | train.py | alissonferreirasv/tacotron | d48a535453b116cc43c1b6bdf8f21b0554a3650b | [
"MIT"
] | null | null | null | train.py | alissonferreirasv/tacotron | d48a535453b116cc43c1b6bdf8f21b0554a3650b | [
"MIT"
] | null | null | null | train.py | alissonferreirasv/tacotron | d48a535453b116cc43c1b6bdf8f21b0554a3650b | [
"MIT"
] | null | null | null | import argparse
from datetime import datetime
import math
import os
import subprocess
import time
import tensorflow as tf
import traceback
from datasets.datafeeder import DataFeeder
from hparams import hparams, hparams_debug_string
from models import create_model
from text import sequence_to_text
from uti... | 42.052632 | 101 | 0.679287 |
0ac7027da226bdebf0132607a63282c36be8c848 | 2,130 | py | Python | updater.py | krets/dns-updater | 3ef360be25b83edef549d48750d5d7bfbbd04bdb | [
"MIT"
] | null | null | null | updater.py | krets/dns-updater | 3ef360be25b83edef549d48750d5d7bfbbd04bdb | [
"MIT"
] | null | null | null | updater.py | krets/dns-updater | 3ef360be25b83edef549d48750d5d7bfbbd04bdb | [
"MIT"
] | null | null | null | """ Update a godaddy DNS entry for a dynamic IP
My shared hosting service keeps migrating my account to a new IP.
This is probably necessary for them to lower their operational costs,
but it sucks for me. I do not use their DNS, so I must manually update
my DNS provider which each change.
This script removes the need... | 30.869565 | 73 | 0.675117 |
7b6015f48829a8586ee025603d5ac386645b96f5 | 394 | py | Python | subjunctive/resource.py | kylelin47/subjunctive | 66c2bf0eae41e597bb2cc42f70cf018da78e2e6a | [
"MIT"
] | 1 | 2015-04-20T12:11:22.000Z | 2015-04-20T12:11:22.000Z | subjunctive/resource.py | kylelin47/subjunctive | 66c2bf0eae41e597bb2cc42f70cf018da78e2e6a | [
"MIT"
] | null | null | null | subjunctive/resource.py | kylelin47/subjunctive | 66c2bf0eae41e597bb2cc42f70cf018da78e2e6a | [
"MIT"
] | null | null | null | import os.path
import sdl2.ext
_paths = [os.path.dirname(__file__)]
def add_path(path):
_paths.append(path)
def image(name):
for path in _paths:
try:
surface = sdl2.ext.load_image(os.path.join(path, name))
except sdl2.ext.common.SDLError:
pass
else:
... | 20.736842 | 67 | 0.611675 |
65d8f597da62ed0c278fa2ab3252f0efab6c5376 | 16,329 | py | Python | src/test.py | CN-TU/PCC-Uspace | 6e3f6d696f9378688389ef74d106e4d0a8039d2d | [
"BSD-3-Clause"
] | 3 | 2020-10-21T12:39:25.000Z | 2021-08-07T16:06:10.000Z | src/test.py | CN-TU/PCC-Uspace | 6e3f6d696f9378688389ef74d106e4d0a8039d2d | [
"BSD-3-Clause"
] | null | null | null | src/test.py | CN-TU/PCC-Uspace | 6e3f6d696f9378688389ef74d106e4d0a8039d2d | [
"BSD-3-Clause"
] | null | null | null | """Example file for testing
This creates a small testnet with ipaddresses from 192.168.0.0/24,
one switch, and three hosts.
"""
import sys, os
import io
import time
import math
import signal
import numpy as np
import fnmatch
sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
try:
del os... | 37.366133 | 594 | 0.716762 |
24c7ab5e0f868646dcdd5ca3d5ca6fb13bb090c9 | 36 | py | Python | tests/__init__.py | WandyYing/mussel | 61711ec07078ee089ba8011a8ef688beaee10de7 | [
"MIT"
] | null | null | null | tests/__init__.py | WandyYing/mussel | 61711ec07078ee089ba8011a8ef688beaee10de7 | [
"MIT"
] | 1 | 2021-12-15T16:28:37.000Z | 2021-12-15T16:28:37.000Z | tests/__init__.py | WandyYing/mussel | 61711ec07078ee089ba8011a8ef688beaee10de7 | [
"MIT"
] | null | null | null | """Unit test package for mussel."""
| 18 | 35 | 0.666667 |
9caaa1de83c1bcbcaea7d3ac04b4bc9655c02ea5 | 2,467 | py | Python | frappe/utils/bench_helper.py | dalwadani/frappe | 8843030374b711d3c72ab840713fdd1a21561bb5 | [
"MIT"
] | null | null | null | frappe/utils/bench_helper.py | dalwadani/frappe | 8843030374b711d3c72ab840713fdd1a21561bb5 | [
"MIT"
] | null | null | null | frappe/utils/bench_helper.py | dalwadani/frappe | 8843030374b711d3c72ab840713fdd1a21561bb5 | [
"MIT"
] | 1 | 2019-10-01T07:32:09.000Z | 2019-10-01T07:32:09.000Z | from __future__ import unicode_literals, print_function
import click
import frappe
import os
import json
import importlib
import frappe.utils
import traceback
click.disable_unicode_literals_warning = True
def main():
commands = get_app_groups()
commands.update({
'get-frappe-commands': get_frappe_commands,
'get-... | 25.697917 | 76 | 0.731658 |
8a9dee6cf1c805215415723e0c7077600c0d8ffb | 14,879 | py | Python | rlbase/algos/sac/sac.py | sahandrez/rlbase | e5ef2a8f4ef0d142c4de41a7aea1bf9bb7708e7e | [
"BSD-3-Clause"
] | null | null | null | rlbase/algos/sac/sac.py | sahandrez/rlbase | e5ef2a8f4ef0d142c4de41a7aea1bf9bb7708e7e | [
"BSD-3-Clause"
] | 4 | 2020-03-13T21:14:41.000Z | 2020-03-18T01:52:53.000Z | rlbase/algos/sac/sac.py | sahandrez/rlbase | e5ef2a8f4ef0d142c4de41a7aea1bf9bb7708e7e | [
"BSD-3-Clause"
] | null | null | null | from copy import deepcopy
import itertools
import numpy as np
import torch
from torch.optim import Adam
import gym
import time
import rlbase.algos.sac.core as core
from rlbase.utils.logx import EpochLogger
class ReplayBuffer:
"""
A simple FIFO experience replay buffer for SAC agents.
"""
def __init__... | 40.105121 | 90 | 0.581289 |
377f477f7c047b0e06b95826128d5a9cc1c64393 | 122 | py | Python | tests/test_helpers/sample.py | linkdd/triotp | 7726438da36255c983d999490109f104655fb3fe | [
"MIT"
] | 4 | 2021-11-26T21:39:17.000Z | 2022-03-04T09:32:07.000Z | tests/test_helpers/sample.py | linkdd/triotp | 7726438da36255c983d999490109f104655fb3fe | [
"MIT"
] | 1 | 2021-11-30T20:28:10.000Z | 2021-12-01T01:03:28.000Z | tests/test_helpers/sample.py | linkdd/triotp | 7726438da36255c983d999490109f104655fb3fe | [
"MIT"
] | null | null | null | from triotp.helpers import current_module
__module__ = current_module()
def get_module():
return current_module()
| 13.555556 | 41 | 0.770492 |
e55b7c8a2a34a3cdcad41fc1ec80341c87473842 | 19,791 | py | Python | venv/Lib/site-packages/caffe2/perfkernels/hp_emblookup_codegen.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | 1 | 2022-01-08T12:30:44.000Z | 2022-01-08T12:30:44.000Z | venv/Lib/site-packages/caffe2/perfkernels/hp_emblookup_codegen.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/caffe2/perfkernels/hp_emblookup_codegen.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null |
import argparse
import sys
sizeof = {"float": 4, "at::Half": 2, "uint8_t": 1}
def unroll(uf, IndexType, InType, OutType, use_weights, isa, fused, use_offsets):
def compute(regid, InType, use_weights, isa, prefetch):
code = []
if InType == "float":
code.append(
... | 37.271186 | 108 | 0.468647 |
4aa6161512337b9f60de396bc8e08d2f621fbf10 | 15,184 | py | Python | src/detext/run_detext.py | qingquansong/detext | 66df145e653ce05af094d3379e27b60d0d3c81b4 | [
"BSD-2-Clause"
] | 1 | 2020-04-15T19:26:05.000Z | 2020-04-15T19:26:05.000Z | src/detext/run_detext.py | qingquansong/detext | 66df145e653ce05af094d3379e27b60d0d3c81b4 | [
"BSD-2-Clause"
] | null | null | null | src/detext/run_detext.py | qingquansong/detext | 66df145e653ce05af094d3379e27b60d0d3c81b4 | [
"BSD-2-Clause"
] | null | null | null | """
Overall pipeline to train the model. It parses arguments, and trains a CLSM model.
"""
import sys
import argparse
import logging
import os
import time
import tensorflow as tf
import tensorflow_ranking as tfr
from detext.train import train
from detext.utils import misc_utils, logger, executor_utils
def add_arg... | 48.980645 | 131 | 0.679004 |
e271479dabf329eb1792b4d958c4b53c06005d37 | 211 | py | Python | practice/practice73.py | tomhaoye/LetsPython | 3c5f66d2e672067ed9aea33c0abd6b01708734ff | [
"MIT"
] | null | null | null | practice/practice73.py | tomhaoye/LetsPython | 3c5f66d2e672067ed9aea33c0abd6b01708734ff | [
"MIT"
] | null | null | null | practice/practice73.py | tomhaoye/LetsPython | 3c5f66d2e672067ed9aea33c0abd6b01708734ff | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
if __name__ == '__main__':
ptr = []
for i in range(5):
num = int(raw_input('input a number:'))
ptr.append(num)
ptr.reverse()
print ptr
| 17.583333 | 47 | 0.530806 |
3db39d4949acf4fac56f7a77d4e1abb56f61e4d4 | 29,036 | py | Python | rest_api/tests/basic_table_tests.py | InspectorIncognito/gtfs-editor | 4e3245f44ec44aeb2d28aa25786dc95a3193fb81 | [
"MIT"
] | 2 | 2021-10-01T16:11:20.000Z | 2022-01-15T10:55:40.000Z | rest_api/tests/basic_table_tests.py | InspectorIncognito/gtfs-editor | 4e3245f44ec44aeb2d28aa25786dc95a3193fb81 | [
"MIT"
] | 3 | 2021-06-10T19:17:55.000Z | 2022-03-05T08:37:46.000Z | rest_api/tests/basic_table_tests.py | InspectorIncognito/gtfs-editor | 4e3245f44ec44aeb2d28aa25786dc95a3193fb81 | [
"MIT"
] | 1 | 2022-03-05T08:37:53.000Z | 2022-03-05T08:37:53.000Z | import datetime
from rest_framework import status
from rest_api.models import Calendar, FeedInfo, Agency, Stop, Route, Trip, StopTime, Level, Shape, ShapePoint, \
CalendarDate, Pathway, Transfer, FareAttribute, Frequency
from rest_api.serializers import CalendarSerializer, LevelSerializer, StopSerializer, \
F... | 28.978044 | 121 | 0.530789 |
6fc82f20780f8efde737cac1b50149d28d70101c | 5,825 | py | Python | catalyst/contrib/dl/callbacks/wandb.py | vsokhatskyi/catalyst | 8516b9d44546600ad597a1fffdf03b7eb23c5e98 | [
"Apache-2.0"
] | null | null | null | catalyst/contrib/dl/callbacks/wandb.py | vsokhatskyi/catalyst | 8516b9d44546600ad597a1fffdf03b7eb23c5e98 | [
"Apache-2.0"
] | null | null | null | catalyst/contrib/dl/callbacks/wandb.py | vsokhatskyi/catalyst | 8516b9d44546600ad597a1fffdf03b7eb23c5e98 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, List # isort:skip
import wandb
from catalyst import utils
from catalyst.core import (
Callback, CallbackNode, CallbackOrder, CallbackScope, State
)
class WandbLogger(Callback):
"""
Logger callback, translates ``state.*_metrics`` to Weights & Biases
Read about Weights & Bias... | 32.18232 | 77 | 0.543519 |
d460b668d6f6a99194e0b523fe8a2485fde04e85 | 4,100 | py | Python | analize/analize.py | radosz99/allegro-scanner | bfe8ffef7383928000465f39b5cf8800629bfae5 | [
"MIT"
] | 1 | 2021-07-10T13:11:03.000Z | 2021-07-10T13:11:03.000Z | analize/analize.py | radosz99/allegro-scanner | bfe8ffef7383928000465f39b5cf8800629bfae5 | [
"MIT"
] | 4 | 2020-04-13T13:40:18.000Z | 2020-04-14T18:51:43.000Z | analize/analize.py | radosz99/allegro-scanner | bfe8ffef7383928000465f39b5cf8800629bfae5 | [
"MIT"
] | null | null | null | from data.connection import get_connection
from data.select import select_user_raports_id
from data.select import select_user_offers
from data.select import select_user_raports
from data.select import select_money_from_offer
from data.select import select_money_from_offer_without_mask
from data.select import select_rap... | 41 | 147 | 0.700244 |
09decbdacfb88c5303637a2ab04bc4279f911223 | 587 | py | Python | ml_data/serve.py | mpszumowski/ml_data_rest_app | 4ded44c77316266461cf46b312f6a8eeefe25cf9 | [
"MIT"
] | null | null | null | ml_data/serve.py | mpszumowski/ml_data_rest_app | 4ded44c77316266461cf46b312f6a8eeefe25cf9 | [
"MIT"
] | null | null | null | ml_data/serve.py | mpszumowski/ml_data_rest_app | 4ded44c77316266461cf46b312f6a8eeefe25cf9 | [
"MIT"
] | null | null | null | import connexion
from cheroot.wsgi import Server
from ml_data.config import rest_cfg
from ml_data.info import __version__, __title__
connexion_app = connexion.FlaskApp(
__name__,
specification_dir='.',
options={
"swagger_ui": True
},
arguments={
'title': __title__,
'version... | 22.576923 | 63 | 0.678024 |
2bec12eea91f2a1e01816664f0c8f163adb549d6 | 1,950 | py | Python | project3/analysis.py | DonDzundza/Berkeley-AI-Course-Projects | 3712d96655292e62e4d0ad25792ae19c48618b2b | [
"MIT"
] | null | null | null | project3/analysis.py | DonDzundza/Berkeley-AI-Course-Projects | 3712d96655292e62e4d0ad25792ae19c48618b2b | [
"MIT"
] | null | null | null | project3/analysis.py | DonDzundza/Berkeley-AI-Course-Projects | 3712d96655292e62e4d0ad25792ae19c48618b2b | [
"MIT"
] | null | null | null | # analysis.py
# -----------
# Licensing Information: Please do not distribute or publish solutions to this
# project. You are free to use and extend these projects for educational
# purposes. The Pacman AI projects were developed at UC Berkeley, primarily by
# John DeNero (denero@cs.berkeley.edu) and Dan Klein (klein@c... | 29.545455 | 78 | 0.715385 |
d40257c6a528d4438e2617ac906f13e0434756ec | 1,766 | py | Python | setup.py | YosaiProject/yosai_dpcache | 85d2c2922165a12ea06315bcbb6a4d6f02729793 | [
"Apache-2.0"
] | 6 | 2015-11-23T15:25:35.000Z | 2017-02-08T16:40:22.000Z | setup.py | YosaiProject/yosai_dpcache | 85d2c2922165a12ea06315bcbb6a4d6f02729793 | [
"Apache-2.0"
] | null | null | null | setup.py | YosaiProject/yosai_dpcache | 85d2c2922165a12ea06315bcbb6a4d6f02729793 | [
"Apache-2.0"
] | 1 | 2019-07-04T09:38:18.000Z | 2019-07-04T09:38:18.000Z | import os
from setuptools import setup, find_packages, Command
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./... | 26.757576 | 79 | 0.620045 |
6519260ebcd4024b7277e5b11c04ff046f2d817f | 18,018 | py | Python | sdk/python/pulumi_aws/iot/topic_rule.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/iot/topic_rule.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/iot/topic_rule.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import ... | 47.415789 | 437 | 0.636475 |
41700dfd2d919e80a8c7c4411e6ad45ee44d4771 | 1,790 | py | Python | qcodes/tests/legacy/test_generic_formatter.py | simonzihlmann/Qcodes | 6be73df1edc68291c7d0ab9edf2293c1b28d553d | [
"MIT"
] | 1 | 2021-04-07T08:53:05.000Z | 2021-04-07T08:53:05.000Z | qcodes/tests/legacy/test_generic_formatter.py | M1racleShih/Qcodes | c03029a6968e16379155aadc8b083a02e01876a6 | [
"MIT"
] | 230 | 2020-08-17T06:08:33.000Z | 2022-03-29T12:06:58.000Z | qcodes/tests/legacy/test_generic_formatter.py | nicholgroup/Qcodes | 6b9701bf469421fcf2ced58f67c01f69eba9d1f4 | [
"MIT"
] | 4 | 2017-12-11T12:13:41.000Z | 2018-08-01T13:13:04.000Z | from unittest import TestCase
import numpy as np
import qcodes
import qcodes.measure
from qcodes.data.hdf5_format import HDF5Format, HDF5FormatMetadata
from qcodes.data.gnuplot_format import GNUPlotFormat
from qcodes.data.data_set import load_data
from qcodes.tests.legacy.data_mocks import DataSet2D
#%%
class TestFo... | 35.098039 | 79 | 0.618994 |
4cd4c59b5d8a1b0f5f2d829f0d65ae95d7a3f460 | 453 | py | Python | genesis/projectmgmt/serializers.py | akshay-web/genesis-app-api | 405c3eca0817819f332ce8df6186f324883c70d1 | [
"MIT"
] | null | null | null | genesis/projectmgmt/serializers.py | akshay-web/genesis-app-api | 405c3eca0817819f332ce8df6186f324883c70d1 | [
"MIT"
] | null | null | null | genesis/projectmgmt/serializers.py | akshay-web/genesis-app-api | 405c3eca0817819f332ce8df6186f324883c70d1 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from projectmgmt.models import Project, User
class ProjectSerializer(serializers.ModelSerializer):
"""Serializer for Project objects"""
users = serializers.SlugRelatedField(queryset=User.objects.all(), many=True, slug_field="username")
class Meta:
model = Pr... | 37.75 | 103 | 0.706402 |
eb9d4e6f148f8c98e00b0a55a8601bf2760c27cd | 6,940 | py | Python | mediagoblin/tools/response.py | eliroca/mediagoblin-imported | c4599508b02f2e61df3a97ff314766a62a3e5934 | [
"CC0-1.0"
] | 1 | 2021-09-21T02:24:43.000Z | 2021-09-21T02:24:43.000Z | mediagoblin/tools/response.py | jgarte/mediagoblin-mirror | c4599508b02f2e61df3a97ff314766a62a3e5934 | [
"CC0-1.0"
] | null | null | null | mediagoblin/tools/response.py | jgarte/mediagoblin-mirror | c4599508b02f2e61df3a97ff314766a62a3e5934 | [
"CC0-1.0"
] | 1 | 2021-09-21T02:25:20.000Z | 2021-09-21T02:25:20.000Z | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either versio... | 37.112299 | 98 | 0.678818 |
90201ab4c108c6fe161bc3fb619b78903a2bf9e4 | 1,351 | py | Python | tests/components/http/test_real_ip.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | tests/components/http/test_real_ip.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | tests/components/http/test_real_ip.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | 1 | 2021-03-13T18:15:31.000Z | 2021-03-13T18:15:31.000Z | """Test real IP middleware."""
import asyncio
from aiohttp import web
from aiohttp.hdrs import X_FORWARDED_FOR
from homeassistant.components.http.real_ip import setup_real_ip
from homeassistant.components.http.const import KEY_REAL_IP
@asyncio.coroutine
def mock_handler(request):
"""Handler that returns the rea... | 27.571429 | 63 | 0.704663 |
dccbb44947a50489876d7376d08a16e8e2f76d4d | 4,912 | py | Python | test/test_symmetries.py | manoelmarques/aqua-chemistry | 931935a1dc3c74d08adb4a4523651b097609630f | [
"Apache-2.0"
] | null | null | null | test/test_symmetries.py | manoelmarques/aqua-chemistry | 931935a1dc3c74d08adb4a4523651b097609630f | [
"Apache-2.0"
] | 1 | 2019-05-15T11:01:07.000Z | 2019-05-15T11:01:07.000Z | test/test_symmetries.py | manoelmarques/aqua-chemistry | 931935a1dc3c74d08adb4a4523651b097609630f | [
"Apache-2.0"
] | 1 | 2022-01-15T15:11:01.000Z | 2022-01-15T15:11:01.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 43.087719 | 106 | 0.64943 |
903323588ab48fa5801bf96a7466acc5d7f44a8b | 4,247 | py | Python | .config/qtile/settings/widgets.py | q3aql/dotfiles | 92375d2217a7e0ed3a36ed1649bc832ad54753f8 | [
"MIT"
] | 1 | 2022-03-28T19:11:18.000Z | 2022-03-28T19:11:18.000Z | .config/qtile/settings/widgets.py | q3aql/dotfiles | 92375d2217a7e0ed3a36ed1649bc832ad54753f8 | [
"MIT"
] | null | null | null | .config/qtile/settings/widgets.py | q3aql/dotfiles | 92375d2217a7e0ed3a36ed1649bc832ad54753f8 | [
"MIT"
] | null | null | null | import psutil
from libqtile import widget
from .theme import colors
from libqtile.widget import base
# Get the icons at https://www.nerdfonts.com/cheat-sheet (you need a Nerd Font)
def base(fg='text', bg='dark'):
return {
'foreground': colors[fg],
'background': colors[bg]
}
def separator():... | 25.431138 | 79 | 0.572169 |
0f6e2b6a441114fb254b13f9b0a18fd4ddf1148d | 17,221 | py | Python | chives/consensus/multiprocess_validation.py | zcomputerwiz/chivesv2-blockchain | f36235e16a348f7fe3e7f9cdbc92615f391a877b | [
"Apache-2.0"
] | null | null | null | chives/consensus/multiprocess_validation.py | zcomputerwiz/chivesv2-blockchain | f36235e16a348f7fe3e7f9cdbc92615f391a877b | [
"Apache-2.0"
] | null | null | null | chives/consensus/multiprocess_validation.py | zcomputerwiz/chivesv2-blockchain | f36235e16a348f7fe3e7f9cdbc92615f391a877b | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
import traceback
from concurrent.futures.process import ProcessPoolExecutor
from dataclasses import dataclass
from typing import Dict, List, Optional, Sequence, Tuple, Union, Callable
from chives.consensus.block_header_validation import validate_finished_header_block
from chives.consensus... | 46.669377 | 117 | 0.65153 |
fe251f9a1033323d1df7bec37d3063d1c868369d | 4,432 | py | Python | dlxtools/pipelines.py | Datalytyx-Data-Science/dlxds | bed58f764eeef689f9921fed976f07bfc6d8439e | [
"MIT"
] | 1 | 2018-10-14T12:52:51.000Z | 2018-10-14T12:52:51.000Z | dlxtools/pipelines.py | Datalytyx-Data-Science/dlxds | bed58f764eeef689f9921fed976f07bfc6d8439e | [
"MIT"
] | null | null | null | dlxtools/pipelines.py | Datalytyx-Data-Science/dlxds | bed58f764eeef689f9921fed976f07bfc6d8439e | [
"MIT"
] | null | null | null | """
This is a pipelines module
Use for creating and saving commonly used pipelines.
"""
#===========================================================================================
#Imports
#===========================================================================================
import numpy as np
import pandas as... | 31.432624 | 99 | 0.518051 |
f975e8ccbeb0ec6b56ba919e9a749a899e956162 | 9,000 | py | Python | docs/conf.py | anduingaiden/newrelic-api | 5a13af2a69ee9bdb1b54192fdd6589e8424345d8 | [
"MIT"
] | 41 | 2015-05-21T03:16:31.000Z | 2021-10-06T07:05:01.000Z | docs/conf.py | anduingaiden/newrelic-api | 5a13af2a69ee9bdb1b54192fdd6589e8424345d8 | [
"MIT"
] | 17 | 2015-01-07T19:35:21.000Z | 2020-06-15T15:20:13.000Z | docs/conf.py | anduingaiden/newrelic-api | 5a13af2a69ee9bdb1b54192fdd6589e8424345d8 | [
"MIT"
] | 31 | 2016-01-04T09:51:04.000Z | 2021-09-01T19:36:19.000Z | # -*- coding: utf-8 -*-
#
# newrelic-api documentation build configuration file, created by
# sphinx-quickstart on Tue Jun 24 11:53:02 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | 31.468531 | 96 | 0.712 |
64aa859fa62ab7cbe863d67efb8575737bd78948 | 1,633 | py | Python | vertica_python/vertica/messages/frontend_messages/copy_error.py | HirniMeshram/vertica-python | 1b308d151794b2e962e122ead15a21aec4abc3a0 | [
"Apache-2.0"
] | null | null | null | vertica_python/vertica/messages/frontend_messages/copy_error.py | HirniMeshram/vertica-python | 1b308d151794b2e962e122ead15a21aec4abc3a0 | [
"Apache-2.0"
] | null | null | null | vertica_python/vertica/messages/frontend_messages/copy_error.py | HirniMeshram/vertica-python | 1b308d151794b2e962e122ead15a21aec4abc3a0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 Micro Focus or one of its affiliates.
#
# 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 ... | 37.113636 | 87 | 0.71831 |
64366273daf3829cf0afaece791eee823c7a305a | 499 | py | Python | 25/02/property_deco.py | pylangstudy/201707 | c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6 | [
"CC0-1.0"
] | null | null | null | 25/02/property_deco.py | pylangstudy/201707 | c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6 | [
"CC0-1.0"
] | 46 | 2017-06-30T22:19:07.000Z | 2017-07-31T22:51:31.000Z | 25/02/property_deco.py | pylangstudy/201707 | c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6 | [
"CC0-1.0"
] | null | null | null | #class property(fget=None, fset=None, fdel=None, doc=None)
class A:
def __init__(self): self.__x = None
@property
def x(self): print('getx'); return self.__x
@x.setter
def x(self, v): print('setx'); self.__x = v
@x.deleter
def x(self): print('delx'); del self.__x
a = A()
a.x = 100
print(a.x... | 23.761905 | 64 | 0.627255 |
e3f57ad6cf68a54739cf5742d9ad5dd02c09c576 | 3,702 | py | Python | web/JPS_EMISSIONS/python/AvoidanceCostPlotter.py | mdhillmancmcl/TheWorldAvatar-CMCL-Fork | 011aee78c016b76762eaf511c78fabe3f98189f4 | [
"MIT"
] | 21 | 2021-03-08T01:58:25.000Z | 2022-03-09T15:46:16.000Z | web/JPS_EMISSIONS/python/AvoidanceCostPlotter.py | mdhillmancmcl/TheWorldAvatar-CMCL-Fork | 011aee78c016b76762eaf511c78fabe3f98189f4 | [
"MIT"
] | 63 | 2021-05-04T15:05:30.000Z | 2022-03-23T14:32:29.000Z | web/JPS_EMISSIONS/python/AvoidanceCostPlotter.py | mdhillmancmcl/TheWorldAvatar-CMCL-Fork | 011aee78c016b76762eaf511c78fabe3f98189f4 | [
"MIT"
] | 15 | 2021-03-08T07:52:03.000Z | 2022-03-29T04:46:20.000Z | import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
import sys
import json
#from caresjpsutil import PythonLogger
AVOIDANCE_COST_CSV = 'data/input/CO2_avoidance_cost_{}_carbon.csv'
AVOIDANCE_COST_PNG = '/images/{}_carbon_avoidance_cost.png'
if __name__ == "__main__":
#pyt... | 35.941748 | 107 | 0.573204 |
2019fd8f029bfa40ff5f6bc73ec7deb15db863a9 | 47 | py | Python | src/window/__init__.py | moddedTechnic/Website-Editor | 807222ce3464ab445b6da8a4586b87759300faad | [
"MIT"
] | null | null | null | src/window/__init__.py | moddedTechnic/Website-Editor | 807222ce3464ab445b6da8a4586b87759300faad | [
"MIT"
] | null | null | null | src/window/__init__.py | moddedTechnic/Website-Editor | 807222ce3464ab445b6da8a4586b87759300faad | [
"MIT"
] | null | null | null | from .app import App
from .colour import colour | 23.5 | 26 | 0.808511 |
f81a83a11247496ed297af3f45ee5dc6e447091d | 1,154 | py | Python | website/migrations/0016_auto_20170422_0855.py | sunijsharma/wikitowns | 47d5a895e9df04778f3436b3523a1e68aeacde85 | [
"MIT"
] | 46 | 2018-02-27T18:21:27.000Z | 2022-01-31T23:05:53.000Z | website/migrations/0016_auto_20170422_0855.py | piyushd26/wikitowns | 8480f7e2ce747313b79d356878aeed1ef541b2d9 | [
"MIT"
] | 40 | 2017-02-08T11:42:42.000Z | 2021-12-13T19:46:25.000Z | website/migrations/0016_auto_20170422_0855.py | piyushd26/wikitowns | 8480f7e2ce747313b79d356878aeed1ef541b2d9 | [
"MIT"
] | 7 | 2018-03-01T00:50:05.000Z | 2020-10-01T14:16:57.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-22 08:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('website', '0015_auto_20170419_0905'),
]
operations = [... | 28.85 | 74 | 0.604853 |
697fd25337d32b879af5d057239f8fd6beaf8652 | 5,829 | py | Python | touchdown/tests/test_aws_elasticache_cache.py | yaybu/touchdown | 70ecda5191ce2d095bc074dcb23bfa1584464814 | [
"Apache-2.0"
] | 14 | 2015-01-05T18:18:04.000Z | 2022-02-07T19:35:12.000Z | touchdown/tests/test_aws_elasticache_cache.py | yaybu/touchdown | 70ecda5191ce2d095bc074dcb23bfa1584464814 | [
"Apache-2.0"
] | 106 | 2015-01-06T00:17:13.000Z | 2019-09-07T00:35:32.000Z | touchdown/tests/test_aws_elasticache_cache.py | yaybu/touchdown | 70ecda5191ce2d095bc074dcb23bfa1584464814 | [
"Apache-2.0"
] | 5 | 2015-01-30T10:18:24.000Z | 2022-02-07T19:35:13.000Z | # Copyright 2016 Isotoma Limited
#
# 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... | 36.892405 | 93 | 0.616229 |
2f3167da2169136d6435f46a51a42be05e1b6b97 | 572 | py | Python | 7) N11 Web Scraping (Name,Link,OldPrice,NewPrice)/n11WebScraping.py | codesigned4/AdvancedPython | 01cb2ca6080dcb3cfd89a9a33c857f64041094b2 | [
"MIT"
] | null | null | null | 7) N11 Web Scraping (Name,Link,OldPrice,NewPrice)/n11WebScraping.py | codesigned4/AdvancedPython | 01cb2ca6080dcb3cfd89a9a33c857f64041094b2 | [
"MIT"
] | null | null | null | 7) N11 Web Scraping (Name,Link,OldPrice,NewPrice)/n11WebScraping.py | codesigned4/AdvancedPython | 01cb2ca6080dcb3cfd89a9a33c857f64041094b2 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
url="https://www.n11.com/bilgisayar/dizustu-bilgisayar"
html=requests.get(url).content
soup=BeautifulSoup(html,"html.parser")
list=soup.find_all("li",{"class":"column"})
for li in list:
name=li.div.a.h3.text.strip()
link=li.div.a.get("href")
oldPrice=li.find... | 33.647059 | 91 | 0.674825 |
47825050f5a832d8c9450307d2166c4fc27a1e46 | 14,330 | py | Python | dlkit/abstract_osid/calendaring/record_templates.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 2 | 2018-02-23T12:16:11.000Z | 2020-10-08T17:54:24.000Z | dlkit/abstract_osid/calendaring/record_templates.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 87 | 2017-04-21T18:57:15.000Z | 2021-12-13T19:43:57.000Z | dlkit/abstract_osid/calendaring/record_templates.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 1 | 2018-03-01T16:44:25.000Z | 2018-03-01T16:44:25.000Z | """Implementations of calendaring abstract base class records."""
# pylint: disable=invalid-name
# Method names comply with OSID specification.
# pylint: disable=no-init
# Abstract classes do not define __init__.
# pylint: disable=too-few-public-methods
# Some interfaces are specified as 'markers' and inclu... | 22.148377 | 72 | 0.711305 |
7d725d58297dee000c1e78f489f9be27274700e8 | 739 | py | Python | tests/pyre/constraints/isGreaterEqual.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | tests/pyre/constraints/isGreaterEqual.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | tests/pyre/constraints/isGreaterEqual.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2018 all rights reserved
#
"""
Exercise "isGreaterEqual"
"""
def test():
import pyre.constraints
constraint = pyre.constraints.isGreaterEqual(value=1)
constraint.validate(1)
constraint.validate(1.1)
... | 17.595238 | 67 | 0.663058 |
ec0d0ed37bebd84232506e18515bbf9494ae64fe | 16,507 | py | Python | femio/fem_attributes.py | ricosjp/femio | f43991132e530c97477374f4bba25a250a6acae8 | [
"Apache-2.0"
] | 21 | 2020-12-27T11:05:35.000Z | 2022-03-02T15:37:18.000Z | femio/fem_attributes.py | ricosjp/femio | f43991132e530c97477374f4bba25a250a6acae8 | [
"Apache-2.0"
] | null | null | null | femio/fem_attributes.py | ricosjp/femio | f43991132e530c97477374f4bba25a250a6acae8 | [
"Apache-2.0"
] | 2 | 2021-04-28T09:41:09.000Z | 2021-07-01T21:18:45.000Z | from pathlib import Path
import numpy as np
from . import config
from .fem_attribute import FEMAttribute
from .fem_elemental_attribute import FEMElementalAttribute
class FEMAttributes:
"""Represents dictionary of FEMAttributes.
Attributes
----------
data: Dict[str, femio.FEMAttribute]
o... | 31.805395 | 79 | 0.559581 |
ccd2c0d4aeb35678653922376973652f48bb2180 | 2,954 | py | Python | quaternion.py | Gillu13/Rubik-solver | 6185dfb072c114adb69068deb239af7bec28a603 | [
"MIT"
] | null | null | null | quaternion.py | Gillu13/Rubik-solver | 6185dfb072c114adb69068deb239af7bec28a603 | [
"MIT"
] | null | null | null | quaternion.py | Gillu13/Rubik-solver | 6185dfb072c114adb69068deb239af7bec28a603 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 29 22:06:08 2014
@author: Gilles Aouizerate
"""
import numpy as np
class quaternion():
"""A simple quaternion class in order to represent a rotation.
To build a quaternion object, one needs to input either the angle and
the unit vector about which the... | 30.453608 | 76 | 0.509817 |
ec4154b6d5befa15d2e915e402ddf57aa226ff17 | 659 | py | Python | configs/HTRPO_FourRoomMaze.py | HTRPOCODES/HTRPO-v2 | 7e085e8077e6caa38d192bbd33b41c49b36ad6a6 | [
"MIT"
] | 7 | 2020-02-24T15:05:20.000Z | 2021-08-24T02:27:13.000Z | configs/HTRPO_FourRoomMaze.py | HTRPOCODES/HTRPO-v2 | 7e085e8077e6caa38d192bbd33b41c49b36ad6a6 | [
"MIT"
] | null | null | null | configs/HTRPO_FourRoomMaze.py | HTRPOCODES/HTRPO-v2 | 7e085e8077e6caa38d192bbd33b41c49b36ad6a6 | [
"MIT"
] | 1 | 2020-07-27T01:43:18.000Z | 2020-07-27T01:43:18.000Z | HTRPOconfig = {
'reward_decay': 0.95,
'max_kl_divergence': 2e-5,
'goal_space': None,
'per_decision': True,
'GAE_lambda': 0.,
'weighted_is': True,
'using_active_goals' : True,
'hidden_layers': [64,64],
'hidden_layers_v': [64,64],
'max_grad_norm': None,
'lr_v': 5e-4,... | 26.36 | 59 | 0.596358 |
daf034dae047d76a27aafe0282ad9f4a42e6910a | 3,432 | py | Python | xue/uniapply/auditing.py | team-xue/xue | e6bd9539803a2bf902f48b65a9df86356b5d46b2 | [
"BSD-3-Clause"
] | 1 | 2015-11-23T02:33:07.000Z | 2015-11-23T02:33:07.000Z | xue/uniapply/auditing.py | team-xue/xue | e6bd9539803a2bf902f48b65a9df86356b5d46b2 | [
"BSD-3-Clause"
] | null | null | null | xue/uniapply/auditing.py | team-xue/xue | e6bd9539803a2bf902f48b65a9df86356b5d46b2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, division
__all__ = [
'is_expired',
'is_auditer',
'is_class_applicable',
'get_auditing_status',
'check_target_user',
]
import datetime
from collections import OrderedDict
from itertools import izip
from .... | 27.677419 | 78 | 0.640734 |
f94772ffe2d59cb509ab3ebcef5ac84013dfc229 | 3,057 | py | Python | models.py | Ch4nYH/Self-PU | 3df125bcab2c7cc5f0b1160ebc60504bf8e9a73c | [
"MIT"
] | null | null | null | models.py | Ch4nYH/Self-PU | 3df125bcab2c7cc5f0b1160ebc60504bf8e9a73c | [
"MIT"
] | null | null | null | models.py | Ch4nYH/Self-PU | 3df125bcab2c7cc5f0b1160ebc60504bf8e9a73c | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiLayerPerceptron(nn.Module):
def __init__(self, dim):
super(MultiLayerPerceptron, self).__init__()
self.l1 = nn.Linear(dim, 300, bias=False)
self.bn1 = nn.BatchNorm1d(300)
self.l2 = nn.Linear(300, ... | 29.970588 | 80 | 0.511286 |
5d7e0ef459a865abd85a33a7b3567a2444540ab3 | 571 | py | Python | h/events.py | gnott/h | 77a0452b8196f7efb97d4a400ce7583062d620e6 | [
"MIT"
] | null | null | null | h/events.py | gnott/h | 77a0452b8196f7efb97d4a400ce7583062d620e6 | [
"MIT"
] | null | null | null | h/events.py | gnott/h | 77a0452b8196f7efb97d4a400ce7583062d620e6 | [
"MIT"
] | null | null | null | __all__ = [
'NewRegistrationEvent',
'RegistrationActivatedEvent',
'PasswordResetEvent',
'ProfileUpdatedEvent',
]
from horus.events import (
NewRegistrationEvent,
RegistrationActivatedEvent,
PasswordResetEvent,
ProfileUpdatedEvent
)
class AnnotationEvent(object):
def __init__(self,... | 21.148148 | 52 | 0.688266 |
d54bc79507843ffd4d2ee84c93fd24f155bd2870 | 3,096 | py | Python | python_visual_animation.py | wongself/TSP | ced936ade3bf1745b94350028535913658cd7391 | [
"MIT"
] | null | null | null | python_visual_animation.py | wongself/TSP | ced936ade3bf1745b94350028535913658cd7391 | [
"MIT"
] | null | null | null | python_visual_animation.py | wongself/TSP | ced936ade3bf1745b94350028535913658cd7391 | [
"MIT"
] | null | null | null | # _*_ coding: utf-8 _*_
"""
python_visual_animation.py by xianhu
"""
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
# 解决中文乱码问题
matplotlib.rcParams["axes.unicode_minus"] = False
def simple_plot():
"""
simple plot
"""
# 生成画布
plt.figure(figsize=(8, 6), dpi=80)
# 打开交互模式
... | 18.428571 | 77 | 0.510336 |
9e052c6b434f00e47bb8a691a1dd1a48a0cdbd7a | 51,268 | py | Python | virtual/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py | kenmutuma001/Blog | 6b19a77b71694bbe9f5e84207de46c68f87ebc5e | [
"Unlicense"
] | 27 | 2019-10-28T05:03:18.000Z | 2021-06-09T00:16:22.000Z | virtual/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py | kenmutuma001/Blog | 6b19a77b71694bbe9f5e84207de46c68f87ebc5e | [
"Unlicense"
] | 12 | 2020-02-03T11:43:02.000Z | 2020-03-02T14:21:10.000Z | virtual/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py | kenmutuma001/Blog | 6b19a77b71694bbe9f5e84207de46c68f87ebc5e | [
"Unlicense"
] | 21 | 2017-11-13T13:23:27.000Z | 2019-10-07T02:00:52.000Z | # sql/types_api.py
# Copyright (C) 2005-2019 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Base types API.
"""
from . import operators
from .base import SchemaEventTarg... | 35.115068 | 81 | 0.64276 |
b889943a8469eef3ea69528e533d7f6987d22228 | 837 | py | Python | tests/nlu_core_tests/component_tests/classifier_tests/snips.py | UPbook-innovations/nlu | 2ae02ce7b6ca163f47271e98b71de109d38adefe | [
"Apache-2.0"
] | null | null | null | tests/nlu_core_tests/component_tests/classifier_tests/snips.py | UPbook-innovations/nlu | 2ae02ce7b6ca163f47271e98b71de109d38adefe | [
"Apache-2.0"
] | 2 | 2021-09-28T05:55:05.000Z | 2022-02-26T11:16:21.000Z | tests/nlu_core_tests/component_tests/classifier_tests/snips.py | atdavidpark/nlu | 619d07299e993323d83086c86506db71e2a139a9 | [
"Apache-2.0"
] | 1 | 2021-09-13T10:06:20.000Z | 2021-09-13T10:06:20.000Z |
import unittest
from nlu import *
class TestCyber(unittest.TestCase):
def test_snips_classifer_model(self):
pipe = nlu.load('en.classify.snips',verbose=True)
df = pipe.predict(['I love pancaces. I hate Mondays', 'I love Fridays'])
print(df.columns)
for c in df.columns:print(c,df[... | 28.862069 | 80 | 0.626045 |
b87b645fa4a74192289c6b89cb6f741250567beb | 2,208 | py | Python | benchmark/startPyquil1234.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1234.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1234.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=49
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=3
pr... | 25.37931 | 64 | 0.547554 |
c2e423368f4ac81870c10de4e87390b8a7fec7a9 | 1,565 | py | Python | h2o-bindings/bin/custom/python/gen_deeplearning.py | 13927729580/h2o-3 | 850ecb214f01340edb62c45242c76212f4b60381 | [
"Apache-2.0"
] | 1 | 2019-09-15T18:50:36.000Z | 2019-09-15T18:50:36.000Z | h2o-bindings/bin/custom/python/gen_deeplearning.py | 13927729580/h2o-3 | 850ecb214f01340edb62c45242c76212f4b60381 | [
"Apache-2.0"
] | null | null | null | h2o-bindings/bin/custom/python/gen_deeplearning.py | 13927729580/h2o-3 | 850ecb214f01340edb62c45242c76212f4b60381 | [
"Apache-2.0"
] | null | null | null | def module_extensions():
class H2OAutoEncoderEstimator(H2ODeepLearningEstimator):
"""
:examples:
>>> import h2o as ml
>>> from h2o.estimators.deeplearning import H2OAutoEncoderEstimator
>>> ml.init()
>>> rows = [[1,2,3,4,0]*50, [2,1,2,4,1]*50, [2,1,4,2,1]*50, [0,1,2,... | 26.525424 | 100 | 0.597444 |
7030c29b25258ba895765d926aa4bf32b359cb46 | 1,122 | py | Python | tests/test_mongo_controller_index_unique.py | lucafaggianelli/layabase | 90733c6b9efd56051dfce5c3d89bd4e657ce7b3f | [
"MIT"
] | 3 | 2019-12-02T23:29:44.000Z | 2019-12-31T00:55:01.000Z | tests/test_mongo_controller_index_unique.py | lucafaggianelli/layabase | 90733c6b9efd56051dfce5c3d89bd4e657ce7b3f | [
"MIT"
] | 29 | 2019-12-02T16:12:45.000Z | 2022-02-17T16:01:55.000Z | tests/test_mongo_controller_index_unique.py | lucafaggianelli/layabase | 90733c6b9efd56051dfce5c3d89bd4e657ce7b3f | [
"MIT"
] | 3 | 2020-01-02T10:58:47.000Z | 2022-02-17T10:55:18.000Z | import pytest
import layabase
import layabase.mongo
@pytest.fixture
def controller():
class TestCollection:
__collection_name__ = "test"
id = layabase.mongo.Column(index_type=layabase.mongo.IndexType.Unique)
id2 = layabase.mongo.Column(index_type=layabase.mongo.IndexType.Unique)
con... | 36.193548 | 113 | 0.690731 |
d47ad07421f18e7dc9d687cb2c02f3a12194be08 | 1,972 | py | Python | yt_dlp/extractor/mojvideo.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 11 | 2022-01-06T22:09:50.000Z | 2022-03-12T22:26:22.000Z | yt_dlp/extractor/mojvideo.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 4 | 2022-02-25T08:20:18.000Z | 2022-03-17T16:16:20.000Z | yt_dlp/extractor/mojvideo.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 3 | 2022-02-19T08:59:13.000Z | 2022-03-06T16:11:21.000Z | from .common import InfoExtractor
from ..utils import (
ExtractorError,
parse_duration,
)
class MojvideoIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?mojvideo\.com/video-(?P<display_id>[^/]+)/(?P<id>[a-f0-9]+)'
_TEST = {
'url': 'http://www.mojvideo.com/video-v-avtu-pred-mano-rdecelaska-... | 37.207547 | 107 | 0.573022 |
11ed06b5fa01f9a6146e1d81ea4334d8b8b18714 | 1,720 | py | Python | src/app/nginx/controller.py | colinnewell/Adventure-Insecure | 46717dd14d88887559bb3a392c67b534c294edaa | [
"MIT"
] | 4 | 2016-09-24T19:46:12.000Z | 2017-07-08T02:17:06.000Z | src/app/nginx/controller.py | colinnewell/Adventure-Insecure | 46717dd14d88887559bb3a392c67b534c294edaa | [
"MIT"
] | null | null | null | src/app/nginx/controller.py | colinnewell/Adventure-Insecure | 46717dd14d88887559bb3a392c67b534c294edaa | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template, \
flash, session, redirect, url_for, current_app
from app.auth.utils import admin_required
from app.nginx.forms import ConfirmClearForm
from app.auth.models import User
import pexpect
import time
import logging
nginx = Blueprint('nginx', __name__, url_prefix='/nginx')... | 36.595745 | 126 | 0.609302 |
73be987116ea6dd87224362579d45fc9e25722ea | 1,773 | py | Python | matcher/api/serializers.py | rzetelskik/ad_hoc | c46d55bd029cbcf5ad40f1fd9f9f40a0f4a60851 | [
"MIT"
] | null | null | null | matcher/api/serializers.py | rzetelskik/ad_hoc | c46d55bd029cbcf5ad40f1fd9f9f40a0f4a60851 | [
"MIT"
] | null | null | null | matcher/api/serializers.py | rzetelskik/ad_hoc | c46d55bd029cbcf5ad40f1fd9f9f40a0f4a60851 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from matcher.models import Answer, Match
from account.models import CustomUser
class AnswerSerializer(serializers.ModelSerializer):
recipient = serializers.SlugRelatedField(slug_field='username', queryset=CustomUser.objects.all(), many=False,
... | 32.833333 | 114 | 0.698252 |
c6f5acb8f88f1d1aafdd6a69ba09b476dc378cdf | 5,156 | py | Python | test/functional/test_framework/netutil.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | null | null | null | test/functional/test_framework/netutil.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | null | null | null | test/functional/test_framework/netutil.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | 1 | 2018-06-12T00:50:01.000Z | 2018-06-12T00:50:01.000Z | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DeimOS Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Linux network utilities.
Roughly based on http://... | 32.427673 | 111 | 0.602599 |
3c9deec45885145bc4f483a6447a651998248fc4 | 5,922 | py | Python | fissix/pgen2/driver.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 11 | 2021-07-14T12:51:58.000Z | 2022-03-10T09:05:32.000Z | fissix/pgen2/driver.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 3 | 2020-09-22T07:00:25.000Z | 2020-11-14T03:36:42.000Z | fissix/pgen2/driver.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 5 | 2021-01-06T05:58:46.000Z | 2022-02-14T01:42:59.000Z | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
# Modifications:
# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Parser driver.
This provides a high-level interface to parse a file into a synta... | 33.647727 | 84 | 0.60233 |
3d68ba20eee43f690de828576d983d0fbada095d | 24,158 | py | Python | electrumx/server/peers.py | johiruddinsultan/electrumx | 493d653406a6f67c7a991f6c48c8ca5f62d735e9 | [
"MIT"
] | null | null | null | electrumx/server/peers.py | johiruddinsultan/electrumx | 493d653406a6f67c7a991f6c48c8ca5f62d735e9 | [
"MIT"
] | null | null | null | electrumx/server/peers.py | johiruddinsultan/electrumx | 493d653406a6f67c7a991f6c48c8ca5f62d735e9 | [
"MIT"
] | null | null | null | # Copyright (c) 2017-2018, JUS
#
# All rights reserved.
#
# See the file "LICENCE" for information about the copyright
# and warranty status of this software.
'''Peer management.'''
import asyncio
import random
import socket
import ssl
import time
from collections import Counter, defaultdict
from ipaddress import IPv... | 39.996689 | 95 | 0.587011 |
a3a5d3a714e64a0deedd90a5a96c69ea2fbeea0e | 2,698 | py | Python | tests/cluster/check_finite_subcluster.py | rancp/ducktape-docs | e1a3b1b7e68beedf5f8d29a4e5f196912a20e264 | [
"Apache-2.0"
] | null | null | null | tests/cluster/check_finite_subcluster.py | rancp/ducktape-docs | e1a3b1b7e68beedf5f8d29a4e5f196912a20e264 | [
"Apache-2.0"
] | null | null | null | tests/cluster/check_finite_subcluster.py | rancp/ducktape-docs | e1a3b1b7e68beedf5f8d29a4e5f196912a20e264 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Confluent Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.589744 | 83 | 0.687546 |
cf2e2c2b22fad7ce82a074e4d7210f28e4b4eaf2 | 2,295 | py | Python | tests/reporter_test.py | vardaan-raj/rally | ec04919d3b44c1e694ae5bc2c9a7901cf31b8e89 | [
"Apache-2.0"
] | null | null | null | tests/reporter_test.py | vardaan-raj/rally | ec04919d3b44c1e694ae5bc2c9a7901cf31b8e89 | [
"Apache-2.0"
] | null | null | null | tests/reporter_test.py | vardaan-raj/rally | ec04919d3b44c1e694ae5bc2c9a7901cf31b8e89 | [
"Apache-2.0"
] | null | null | null | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this f... | 43.301887 | 107 | 0.688889 |
c5e36527e52e231f3c914ff61d8f65896451843b | 2,288 | py | Python | samples/AddAdobeIDUser.py | Luci2015/umapi-documentation | a7eb376ffe13e6681f7ae8e314c60e803cc04fe6 | [
"MIT"
] | 7 | 2017-11-07T23:31:10.000Z | 2021-05-09T07:26:16.000Z | samples/AddAdobeIDUser.py | Luci2015/umapi-documentation | a7eb376ffe13e6681f7ae8e314c60e803cc04fe6 | [
"MIT"
] | 13 | 2017-09-12T16:48:28.000Z | 2022-03-24T11:55:28.000Z | samples/AddAdobeIDUser.py | Luci2015/umapi-documentation | a7eb376ffe13e6681f7ae8e314c60e803cc04fe6 | [
"MIT"
] | 17 | 2017-06-28T14:12:59.000Z | 2021-10-04T17:06:07.000Z | #!/usr/bin/python
#*************************************************************************
#
# ADOBE CONFIDENTIAL
# ___________________
#
# Copyright 2017 Adobe Systems Incorporated
# All Rights Reserved.
#
# NOTICE: Adobe permits you to use, modify, and distribute this file in
# accordance with the terms of the... | 26.298851 | 95 | 0.649913 |
16891fa4456acf2ca880d86fcab14dc1c8637cff | 2,776 | py | Python | 10.3389/fevo.2021.762173/scripts/print_image_capure_dates.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fevo.2021.762173/scripts/print_image_capure_dates.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fevo.2021.762173/scripts/print_image_capure_dates.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | import os
import sys
import glob
from PIL import Image
from PIL import ExifTags
from PIL.ExifTags import TAGS
# pwd
# # ~/projects/dragonfly/data/dataset_T
# python ../../scripts/print_image_capure_dates.py cropped_image
# python ../../scripts/print_image_capure_dates.py raw
def get_gps(fpath):
im = Image.ope... | 27.215686 | 79 | 0.524135 |
e205b0b7c9b53a2fe3c0ea438ae76670c28234f5 | 9,044 | py | Python | sdk/python/pulumi_google_native/compute/beta/get_http_health_check.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 44 | 2021-04-18T23:00:48.000Z | 2022-02-14T17:43:15.000Z | sdk/python/pulumi_google_native/compute/beta/get_http_health_check.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 354 | 2021-04-16T16:48:39.000Z | 2022-03-31T17:16:39.000Z | sdk/python/pulumi_google_native/compute/beta/get_http_health_check.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 8 | 2021-04-24T17:46:51.000Z | 2022-01-05T10:40:21.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 42.460094 | 444 | 0.66851 |
daec10219060314083d5dcdf96b05befbd5a2b21 | 12,165 | py | Python | examples/terran/ramp_wall.py | DrInfy/python-sc2 | c08b06b19dee8fd973dec9a2e2383f3ab76d8e77 | [
"MIT"
] | 1 | 2021-03-13T08:25:51.000Z | 2021-03-13T08:25:51.000Z | examples/terran/ramp_wall.py | DrInfy/python-sc2 | c08b06b19dee8fd973dec9a2e2383f3ab76d8e77 | [
"MIT"
] | 1 | 2021-11-11T11:51:12.000Z | 2021-11-11T11:51:12.000Z | examples/terran/ramp_wall.py | DrInfy/python-sc2 | c08b06b19dee8fd973dec9a2e2383f3ab76d8e77 | [
"MIT"
] | 1 | 2021-11-11T11:48:45.000Z | 2021-11-11T11:48:45.000Z | import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
import random, numpy as np
import sc2
from sc2 import Race, Difficulty
from sc2.constants import *
from sc2.player import Bot, Computer
from sc2.position import Point2, Point3
from sc2.unit import Unit
from sc2.units import Units
from ... | 42.093426 | 143 | 0.5806 |
2b966e97d8a4b69af43efd3160e0d5484dfbf01e | 23,862 | py | Python | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/operations/_my_workbooks_operations.py | moovy2/azure-sdk-for-python | 6b0495dc9917d47a7264f26cbd3221d43461a537 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/operations/_my_workbooks_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/operations/_my_workbooks_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.206009 | 181 | 0.669684 |
a1de296141d5a10278c5889388a542d96b25270d | 1,784 | py | Python | DistributionTools/DataPipeline/Windows/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 3 | 2016-11-11T06:11:03.000Z | 2021-09-12T22:13:51.000Z | DistributionTools/DataPipeline/Windows/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | null | null | null | DistributionTools/DataPipeline/Windows/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 2 | 2016-02-15T16:10:36.000Z | 2018-02-27T10:33:21.000Z | #!/usr/bin/env python
#bbfreeze setup file for DataPipeline distribution on Windows
#Damien Farrell, #Nov 2011
"""
This script can be used to create a standalone executable for
either windows or linux. It must be run on the target platform.
You will need to install bbfreeze, see http://pypi.python.org/pypi/bb... | 30.237288 | 77 | 0.688341 |
5b5acbdbe12535f3d787b1bcbadb24521f45c0e7 | 2,587 | py | Python | vsts/vsts/build/v4_1/models/definition_reference.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/build/v4_1/models/definition_reference.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/build/v4_1/models/definition_reference.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 41.725806 | 152 | 0.565133 |
a089561d1635765689a84e338ced4ad78c012d4a | 12,781 | py | Python | switch_model/hawaii/reserves.py | DesmondZhong/switch | 88abc164128b6a7345c7aa8806e2b37f74de54fa | [
"ECL-2.0",
"Apache-2.0"
] | 100 | 2015-06-30T02:33:39.000Z | 2022-02-07T17:28:10.000Z | switch_model/hawaii/reserves.py | DesmondZhong/switch | 88abc164128b6a7345c7aa8806e2b37f74de54fa | [
"ECL-2.0",
"Apache-2.0"
] | 117 | 2015-07-07T00:45:01.000Z | 2021-05-29T18:55:06.000Z | switch_model/hawaii/reserves.py | DesmondZhong/switch | 88abc164128b6a7345c7aa8806e2b37f74de54fa | [
"ECL-2.0",
"Apache-2.0"
] | 70 | 2015-06-30T02:36:05.000Z | 2022-03-08T00:15:32.000Z | """
Defines types of reserve target and components that contribute to reserves,
and enforces the reserve targets.
"""
from __future__ import division
import os
from pyomo.environ import *
# TODO: use standard reserves module for this
def define_arguments(argparser):
argparser.add_argument('--reserves-from-storage... | 48.596958 | 122 | 0.663485 |
ad49c3ae5021e21a1ae0682a40dbcbbde21dfcfc | 1,893 | py | Python | venv/lib/python3.8/site-packages/troposphere/servicediscovery.py | ayfallen/urler | d7bb5c83018a75cb4af2bbb7178bcf364b61f68f | [
"MIT"
] | 2 | 2021-04-03T06:34:08.000Z | 2022-01-14T22:27:02.000Z | venv/lib/python3.8/site-packages/troposphere/servicediscovery.py | ayfallen/urler | d7bb5c83018a75cb4af2bbb7178bcf364b61f68f | [
"MIT"
] | 6 | 2020-09-05T01:40:23.000Z | 2022-03-12T00:40:58.000Z | venv/lib/python3.8/site-packages/troposphere/servicediscovery.py | ayfallen/urler | d7bb5c83018a75cb4af2bbb7178bcf364b61f68f | [
"MIT"
] | 1 | 2020-09-05T00:19:03.000Z | 2020-09-05T00:19:03.000Z | # Copyright (c) 2012-2017, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, AWSProperty
class Instance(AWSObject):
resource_type = "AWS::ServiceDiscovery::Instance"
props = {
'InstanceAttributes': (dict, True),
'InstanceId': (st... | 21.758621 | 68 | 0.59588 |
eb7b4851e6bc7cc39367095ac1f88cfc59e70ed6 | 5,702 | py | Python | pages/views.py | ahsohel/My_art | d3bf86b753533b5cc0dbdfd95c39e5ce1a46630e | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | pages/views.py | ahsohel/My_art | d3bf86b753533b5cc0dbdfd95c39e5ce1a46630e | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | pages/views.py | ahsohel/My_art | d3bf86b753533b5cc0dbdfd95c39e5ce1a46630e | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.shortcuts import render, redirect, get_object_or_404
from .forms import ArtUploadForm, ArtworkDetail
from django.http import JsonResponse
from .models import Upload, ArtworkDetails ... | 35.861635 | 115 | 0.627148 |
9f4c4c29d901762b8eee00a641ea509024dcdf9a | 4,648 | py | Python | tgs.py | Deeplayer/unet | c1eccd74becbba8bd12a79000dc2e232ea90a5c0 | [
"MIT"
] | null | null | null | tgs.py | Deeplayer/unet | c1eccd74becbba8bd12a79000dc2e232ea90a5c0 | [
"MIT"
] | null | null | null | tgs.py | Deeplayer/unet | c1eccd74becbba8bd12a79000dc2e232ea90a5c0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os, cv2, sys, random, warnings
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tqdm import tqdm, tqdm_notebook
from skimage.io import imread, imshow, imread_collection, concatenate_images
from skimage.transform import resize
from skimage.morphology im... | 32.503497 | 121 | 0.656627 |
757fd6ad47e84b1001435cccfaf4bbb14dc717d9 | 32,410 | py | Python | stomp/transport.py | Anthchirp/stomp.py | c7642e4f9a0b50ef1a245427506539f0c4888cbb | [
"Apache-2.0"
] | null | null | null | stomp/transport.py | Anthchirp/stomp.py | c7642e4f9a0b50ef1a245427506539f0c4888cbb | [
"Apache-2.0"
] | null | null | null | stomp/transport.py | Anthchirp/stomp.py | c7642e4f9a0b50ef1a245427506539f0c4888cbb | [
"Apache-2.0"
] | 1 | 2020-03-22T12:55:31.000Z | 2020-03-22T12:55:31.000Z | """Provides the underlying transport functionality (for stomp message transmission) - (mostly) independent from the actual STOMP protocol
"""
import errno
from io import BytesIO
import logging
import math
import random
import re
import socket
import sys
import threading
import time
import warnings
try:
import ssl... | 39.284848 | 137 | 0.56535 |
0ad8962b65b67ab35539ee7c23e143cf89cb0428 | 83,666 | py | Python | pysnmp-with-texts/Wellfleet-IPX-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/Wellfleet-IPX-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/Wellfleet-IPX-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Wellfleet-IPX-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-IPX-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:40:39 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 149.137255 | 8,318 | 0.792437 |
a630997d67ddc69ed95d616379d67a45f7d25a4b | 503 | py | Python | database/information/INNODB_FT_DELETED.py | mshobair/invitro_cheminformatics | 17201496c73453accd440646a1ee81726119a59c | [
"MIT"
] | null | null | null | database/information/INNODB_FT_DELETED.py | mshobair/invitro_cheminformatics | 17201496c73453accd440646a1ee81726119a59c | [
"MIT"
] | null | null | null | database/information/INNODB_FT_DELETED.py | mshobair/invitro_cheminformatics | 17201496c73453accd440646a1ee81726119a59c | [
"MIT"
] | null | null | null | import datetime
from database.database_schemas import Schemas
from sqlalchemy import Column, ForeignKey, Integer, String, DateTime
from sqlalchemy.dialects.mysql import BIGINT, SMALLINT, DOUBLE, TIMESTAMP, TINYINT
from database.base import Base
class InnodbFtDeleted(Base):
"""Maps to INNODB_FT_DELETED table in ... | 29.588235 | 82 | 0.785288 |
9a92742bc79d7afbc8b07de6abf9240a6beb4eeb | 487 | py | Python | agent/test/test_meter_unittest.py | rampopat/charje | 3af178bd72800e339c45637356440780c3b0563a | [
"MIT"
] | 1 | 2021-12-22T02:04:40.000Z | 2021-12-22T02:04:40.000Z | agent/test/test_meter_unittest.py | rampopat/charje | 3af178bd72800e339c45637356440780c3b0563a | [
"MIT"
] | null | null | null | agent/test/test_meter_unittest.py | rampopat/charje | 3af178bd72800e339c45637356440780c3b0563a | [
"MIT"
] | null | null | null | import unittest
from unittest import TestCase
from agents.meter import Meter
class TestMeter(TestCase):
def test_get_latest_aggregate_consumption(self):
expected1 = 0.434
expected2 = 0.561
meter = Meter('MAC000002')
actual1 = meter.get_latest_consumption()
actual2 = mete... | 21.173913 | 52 | 0.691992 |
f8c002c523f224a211995b10f778bcca6d87bd4d | 2,383 | py | Python | train/Prm/create_prm.py | louisletoumelin/wind_downscaling_cnn | 9d08711620db1ee1f472847f0e822c5f4eb1d300 | [
"W3C"
] | null | null | null | train/Prm/create_prm.py | louisletoumelin/wind_downscaling_cnn | 9d08711620db1ee1f472847f0e822c5f4eb1d300 | [
"W3C"
] | 12 | 2021-11-30T16:56:05.000Z | 2021-12-13T16:26:31.000Z | train/Prm/create_prm.py | louisletoumelin/wind_downscaling_cnn | 9d08711620db1ee1f472847f0e822c5f4eb1d300 | [
"W3C"
] | null | null | null | import itertools
'''
prm
'''
def create_prm_dict():
"""
Create several dictionaries containing information about the training parameters.
Input: Parameters (defined inside the function)
Outputs: [prm1, prm2, ...] with element being a dictionary with info about training
"""
prms = {
#... | 30.164557 | 96 | 0.53504 |
7147abf426c731237bd5fefff867811b2c61c9b9 | 18,873 | py | Python | validator/tests/test_scheduler/yaml_scheduler_tester.py | suparnadhar/SuparnaGit | bec2704d8b6bc1802523ec26dcb902f59a747a4d | [
"Apache-2.0"
] | 1 | 2017-08-04T10:31:00.000Z | 2017-08-04T10:31:00.000Z | validator/tests/test_scheduler/yaml_scheduler_tester.py | suparnadhar/SuparnaGit | bec2704d8b6bc1802523ec26dcb902f59a747a4d | [
"Apache-2.0"
] | null | null | null | validator/tests/test_scheduler/yaml_scheduler_tester.py | suparnadhar/SuparnaGit | bec2704d8b6bc1802523ec26dcb902f59a747a4d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Intel Corporation
#
# 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 wri... | 38.437882 | 84 | 0.587612 |
06ae3643944f97dbcd09aa85d2bd01859f5595c6 | 796 | py | Python | testprojectD-rice-d058558a4d4f/rice/api/change_phone.py | YuanXMjoy/rice | 05e908eea8c9189c3b392d2d57e5653191bf1da9 | [
"MIT"
] | null | null | null | testprojectD-rice-d058558a4d4f/rice/api/change_phone.py | YuanXMjoy/rice | 05e908eea8c9189c3b392d2d57e5653191bf1da9 | [
"MIT"
] | null | null | null | testprojectD-rice-d058558a4d4f/rice/api/change_phone.py | YuanXMjoy/rice | 05e908eea8c9189c3b392d2d57e5653191bf1da9 | [
"MIT"
] | null | null | null | from flask import request, jsonify
from .. import db
from ..models import User
from . import api
@api.route('/change_phone', methods=['PUT'])
def change_phone():
username = request.form.get('username', type=str)
password = request.form.get('password', type=str)
new_phone_number = request.form.get('phone_n... | 25.677419 | 65 | 0.594221 |
5d07a2776f6d1b9ef7f27f5cb74d638333586115 | 562 | py | Python | ch15/LineBot/app/router.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | ch15/LineBot/app/router.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | ch15/LineBot/app/router.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | 1 | 2021-07-23T09:59:15.000Z | 2021-07-23T09:59:15.000Z | from app import app, handler, request, abort
from linebot.exceptions import InvalidSignatureError
from flask import render_template
# 設定預設網頁
@app.route("/")
def home():
return render_template("home.html")
# 接收 Line 平台來的「通知」
@app.route("/callback", methods=['POST'])
def callback():
signature = request.headers[... | 24.434783 | 52 | 0.692171 |
44d25ee91440d627c19156e2f958651e1c204727 | 14,981 | py | Python | sdk/python/pulumi_aws/ec2/vpc_endpoint.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/vpc_endpoint.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/vpc_endpoint.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class VpcEnd... | 53.503571 | 366 | 0.678793 |
afcaee42220d9673d58f3d040843e58e091f90f4 | 404 | py | Python | code/subsets.py | shenhuaze/leetcode-python | b81bdb27d0f9da5620e83e2476c9ef585f4a0001 | [
"MIT"
] | 1 | 2019-06-17T04:37:39.000Z | 2019-06-17T04:37:39.000Z | code/subsets.py | shenhuaze/leetcode-python | b81bdb27d0f9da5620e83e2476c9ef585f4a0001 | [
"MIT"
] | null | null | null | code/subsets.py | shenhuaze/leetcode-python | b81bdb27d0f9da5620e83e2476c9ef585f4a0001 | [
"MIT"
] | null | null | null | """
@author Huaze Shen
@date 2019-09-28
"""
def subsets(nums):
results = [[]]
for i in range(len(nums)):
size = len(results)
for j in range(size):
results.append(results[j][:])
results[j].append(nums[i])
return results
if __name__ == '__main__':
nums_ = [1, 2,... | 18.363636 | 41 | 0.554455 |
b93479042726a9ea469a159e9439f289b7359e8c | 3,927 | py | Python | AppServer/google/appengine/ext/bulkload/simpletext_connector.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/google/appengine/ext/bulkload/simpletext_connector.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/google/appengine/ext/bulkload/simpletext_connector.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 31.926829 | 79 | 0.692131 |
825bd070af0094185098a1c329f8948eed2be479 | 2,288 | py | Python | lib/surface/compute/security_policies/list_preconfigured_expression_sets.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/surface/compute/security_policies/list_preconfigured_expression_sets.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/security_policies/list_preconfigured_expression_sets.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2018 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.2 | 80 | 0.754808 |
ea6f62b5bc4f45cefd9fb009c9276ba663bedfca | 10,517 | py | Python | HW4 - 95542247/q4/gen/Assignment4q4Lexer.py | SadraGoudarzdashti/IUSTCompiler | 7aa24df7de10030c313ad2e8f3830d9e2b182ce1 | [
"MIT"
] | null | null | null | HW4 - 95542247/q4/gen/Assignment4q4Lexer.py | SadraGoudarzdashti/IUSTCompiler | 7aa24df7de10030c313ad2e8f3830d9e2b182ce1 | [
"MIT"
] | null | null | null | HW4 - 95542247/q4/gen/Assignment4q4Lexer.py | SadraGoudarzdashti/IUSTCompiler | 7aa24df7de10030c313ad2e8f3830d9e2b182ce1 | [
"MIT"
] | null | null | null | # Generated from C:/Users/novin/PycharmProjects/tamrin-compiler\Assignment4q4.g4 by ANTLR 4.9.1
from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2)")
buf.... | 53.116162 | 103 | 0.543216 |
a8ee90113def8c7db3a3a7bf03f74791cc5fb9f3 | 6,343 | py | Python | ascii_art/ascii_art.py | JustinHBird/ascii_art | b34684a706863d38e3e1cbb6b45ac868b8d9c528 | [
"MIT"
] | null | null | null | ascii_art/ascii_art.py | JustinHBird/ascii_art | b34684a706863d38e3e1cbb6b45ac868b8d9c528 | [
"MIT"
] | 4 | 2021-06-08T20:33:30.000Z | 2022-03-12T00:03:56.000Z | ascii_art/ascii_art.py | JustinHBird/ascii_art | b34684a706863d38e3e1cbb6b45ac868b8d9c528 | [
"MIT"
] | null | null | null | import os
import math
from subprocess import Popen, PIPE
from PIL import Image
from brightness import Brightness
class AsciiArt:
"""Class to convert .jpg or .png image to ascii art.
Attributes:
ascii_chars: A string of ascii characters to be used in generating the image.
x_calibrate: An int... | 38.210843 | 149 | 0.63172 |
1c2e797e399706d5a8b5cbb79669143ef784f79c | 1,117 | py | Python | setup.py | ragnarok22/ptb-django-cookiecutter | 4a06df669052ec24fcca47c01c50bc20fc0a8561 | [
"BSD-3-Clause"
] | 18 | 2021-06-23T07:41:26.000Z | 2022-02-04T07:56:39.000Z | setup.py | ragnarok22/ptb-django-cookiecutter | 4a06df669052ec24fcca47c01c50bc20fc0a8561 | [
"BSD-3-Clause"
] | 5 | 2021-07-11T03:24:58.000Z | 2021-11-01T20:17:38.000Z | setup.py | ragnarok22/ptb-django-cookiecutter | 4a06df669052ec24fcca47c01c50bc20fc0a8561 | [
"BSD-3-Clause"
] | 7 | 2021-08-10T20:36:03.000Z | 2021-12-13T18:35:57.000Z | # !/usr/bin/env python
from distutils.core import setup
setup(
name='ptb-django-cookiecutter',
packages=[],
version='0.1.1',
description='A simple cookiecutter to create Python Telegram bot, wrapped with Django.',
author='Carlos Lugones',
license='MIT',
author_email='contact@lugodev.com',
... | 36.032258 | 92 | 0.617726 |
8049cda86f3a4eb2f66e099618af088d4cd0b00e | 4,464 | py | Python | test/python/circuit/test_matrix_gate.py | quantumkoen/qiskit-terra | 495046d07471e64eab6ddbdfdf8bdef88f0c644f | [
"Apache-2.0"
] | null | null | null | test/python/circuit/test_matrix_gate.py | quantumkoen/qiskit-terra | 495046d07471e64eab6ddbdfdf8bdef88f0c644f | [
"Apache-2.0"
] | null | null | null | test/python/circuit/test_matrix_gate.py | quantumkoen/qiskit-terra | 495046d07471e64eab6ddbdfdf8bdef88f0c644f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=unused-import
"""Test matrix gates"""
import os
import tempfile
import unittest
import numpy
import qisk... | 36 | 79 | 0.607079 |
b01e26c9aefab074df1983f12a5b1132baba1b38 | 128 | py | Python | animal_colors/__init__.py | afeinstein20/animal_colors | 0673ac558824251a7d599dccb6333f03983b6d8e | [
"MIT"
] | null | null | null | animal_colors/__init__.py | afeinstein20/animal_colors | 0673ac558824251a7d599dccb6333f03983b6d8e | [
"MIT"
] | null | null | null | animal_colors/__init__.py | afeinstein20/animal_colors | 0673ac558824251a7d599dccb6333f03983b6d8e | [
"MIT"
] | null | null | null | import os
PACKAGEDIR = os.path.abspath(os.path.dirname(__file__))
from .animal_sensitivity import *
from .to_colormap import *
| 21.333333 | 55 | 0.789063 |
4f6a4bbcd7617d162a396e7af4a28bf496775fa7 | 85,534 | py | Python | grr/server/grr_response_server/data_store_test.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/data_store_test.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/data_store_test.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | 2 | 2020-08-24T00:22:03.000Z | 2020-11-14T08:34:43.000Z | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""These are basic tests for the data store abstraction.
Implementations should be able to pass these tests to be conformant.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import functool... | 34.2136 | 80 | 0.648982 |
58697a00667266180fca70d1ef1cd183ba5d0c1f | 40,604 | py | Python | boto/codedeploy/layer1.py | ContextLogic/boto | 108d3c653f0a3c20794da930eee9df1b27774657 | [
"MIT"
] | null | null | null | boto/codedeploy/layer1.py | ContextLogic/boto | 108d3c653f0a3c20794da930eee9df1b27774657 | [
"MIT"
] | 3 | 2020-01-27T22:40:44.000Z | 2020-10-06T16:22:11.000Z | boto/codedeploy/layer1.py | ContextLogic/boto | 108d3c653f0a3c20794da930eee9df1b27774657 | [
"MIT"
] | 2 | 2020-05-14T05:59:29.000Z | 2020-05-14T07:27:31.000Z | # Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... | 45.115556 | 102 | 0.667274 |
a4286b08898ef3f4b1bed01ab3a4ee36c61fc371 | 24 | py | Python | c/PBP_net/__init__.py | jackonelli/Probabilistic-Backpropagation | ee20b7fc917f82c7198e1c6e3b9a3ef88c436014 | [
"BSD-3-Clause"
] | null | null | null | c/PBP_net/__init__.py | jackonelli/Probabilistic-Backpropagation | ee20b7fc917f82c7198e1c6e3b9a3ef88c436014 | [
"BSD-3-Clause"
] | null | null | null | c/PBP_net/__init__.py | jackonelli/Probabilistic-Backpropagation | ee20b7fc917f82c7198e1c6e3b9a3ef88c436014 | [
"BSD-3-Clause"
] | null | null | null | from PBP_net import pbp
| 12 | 23 | 0.833333 |
204eb95fb180ac22b2803a1b3501bee0fd13b14b | 4,423 | py | Python | .history/classes/Menu_20171107144533.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Menu_20171107144533.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Menu_20171107144533.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | # DADSA - Assignment 1
# Reece Benson
from os import system as call
from collections import OrderedDict
class Menu():
# Define the variables we will be using
_app = None
_menu = None
_current_menu = 0
def __init__(self, app):
# Set our Application
self._app = app
def load(sel... | 31.592857 | 177 | 0.5286 |
af23e8a9665a0c8f0eca3cbbb6d262296c1596ce | 8,393 | py | Python | docs/conf.py | Alveo/pyalveo | 1e9eec22bc031bc9a08066f9966565a546e6242e | [
"BSD-3-Clause"
] | 2 | 2016-12-04T04:32:34.000Z | 2019-04-18T09:38:33.000Z | docs/conf.py | Alveo/pyalveo | 1e9eec22bc031bc9a08066f9966565a546e6242e | [
"BSD-3-Clause"
] | 4 | 2017-05-24T01:37:48.000Z | 2018-04-09T02:35:25.000Z | docs/conf.py | Alveo/pyalveo | 1e9eec22bc031bc9a08066f9966565a546e6242e | [
"BSD-3-Clause"
] | 2 | 2016-11-21T03:49:43.000Z | 2017-10-05T04:08:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... | 30.52 | 76 | 0.715358 |
b7375343672d555258ab79a1080180f27c6682db | 9,997 | py | Python | fuzz_lightyear/request.py | tanx16/fuzz-lightyear | 3b311686797d9eda0eed5b8d4831b70d2ab10221 | [
"Apache-2.0"
] | null | null | null | fuzz_lightyear/request.py | tanx16/fuzz-lightyear | 3b311686797d9eda0eed5b8d4831b70d2ab10221 | [
"Apache-2.0"
] | null | null | null | fuzz_lightyear/request.py | tanx16/fuzz-lightyear | 3b311686797d9eda0eed5b8d4831b70d2ab10221 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from functools import lru_cache
from typing import Any
from typing import Callable
from typing import cast
from typing import Dict
from typing import List
from typing import Optional
from urllib.parse import quote_plus
from urllib.parse import urlencode
from bravado.client import Ca... | 34.832753 | 112 | 0.589777 |
28ff079b9134f4a464d0ed8209bda1564488e91e | 7,103 | py | Python | tests/ut/python/parallel/test_auto_parallel_two_matmul.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | tests/ut/python/parallel/test_auto_parallel_two_matmul.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | null | null | null | tests/ut/python/parallel/test_auto_parallel_two_matmul.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... | 43.845679 | 106 | 0.731803 |
78ada0b4ec4bf9ec0cebfdb00b20ce5aeaa465ce | 21,713 | py | Python | autoscale/server_control/aws.py | usaar33/ec2_autoscale | e1646869057c1d01d031b2a19bb62db5c31817aa | [
"MIT"
] | null | null | null | autoscale/server_control/aws.py | usaar33/ec2_autoscale | e1646869057c1d01d031b2a19bb62db5c31817aa | [
"MIT"
] | null | null | null | autoscale/server_control/aws.py | usaar33/ec2_autoscale | e1646869057c1d01d031b2a19bb62db5c31817aa | [
"MIT"
] | null | null | null | """
The aws module is intended to provide an interface to aws
It tightly interfaces with boto. Indeed, many functions require a boto connection object parameter
While it exposes boto objects (espcially instances) to callees, it provides the following ease of use ability:
* Unpacking reservations into reservations
*... | 38.982047 | 141 | 0.613688 |
285db251c64854255249a7080b75a6d8d86f80a4 | 16,077 | py | Python | jsonargparse/util.py | shenmishajing/jsonargparse | f08329c49b267b9c21a845d533356ec8178c84ec | [
"MIT"
] | null | null | null | jsonargparse/util.py | shenmishajing/jsonargparse | f08329c49b267b9c21a845d533356ec8178c84ec | [
"MIT"
] | null | null | null | jsonargparse/util.py | shenmishajing/jsonargparse | f08329c49b267b9c21a845d533356ec8178c84ec | [
"MIT"
] | null | null | null | """Collection of general functions and classes."""
import inspect
import logging
import os
import re
import stat
import sys
import warnings
from collections import defaultdict
from contextlib import contextmanager, redirect_stderr
from contextvars import ContextVar
from typing import Any, Optional, Tuple, Union
from ... | 38.097156 | 120 | 0.605648 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.