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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f5442fda543ea143316e891a5b0389f7115be0b9 | 789 | py | Python | baekjoon/11292.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | baekjoon/11292.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | baekjoon/11292.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | """
11292 : 키 큰 사람
URL : https://www.acmicpc.net/problem/11292
Input :
3
John 1.75
Mary 1.64
Sam 1.81
2
Jose 1.62
Miguel 1.58
5
John 1.75
Mary 1.75
Sam 1.74
Jose 1.75
Miguel 1.75
0
Output :
... | 18.785714 | 47 | 0.474018 |
59e714147166c65d1e080b89188625142c4390c8 | 25,994 | py | Python | scikits/crab/models/classes.py | wnyc/crab | 5f08cac958a930df82518a0216a3f2fa39a4e904 | [
"BSD-3-Clause"
] | 3 | 2015-06-02T16:43:05.000Z | 2020-05-27T22:30:36.000Z | scikits/crab/models/classes.py | wnyc/crab | 5f08cac958a930df82518a0216a3f2fa39a4e904 | [
"BSD-3-Clause"
] | null | null | null | scikits/crab/models/classes.py | wnyc/crab | 5f08cac958a930df82518a0216a3f2fa39a4e904 | [
"BSD-3-Clause"
] | null | null | null | #-*- coding:utf-8 -*-
"""
Several Basic Data models.
"""
# Authors: Marcel Caraciolo <marcel@muricoca.com>
# License: BSD Style
import numpy as np
from .base import BaseDataModel
from .utils import UserNotFoundError, ItemNotFoundError
import logging
logger = logging.getLogger('crab')
############################... | 34.02356 | 94 | 0.552897 |
ce305c6476cdb43873a57e09e97428cdeb5103b3 | 26,320 | py | Python | elasticsearch_django/models.py | octoenergy/elasticsearch-django | 4b24fb8bb5729d950c8d56740f8be0acb336de1c | [
"MIT"
] | 87 | 2016-09-04T06:24:04.000Z | 2022-02-01T01:43:47.000Z | elasticsearch_django/models.py | octoenergy/elasticsearch-django | 4b24fb8bb5729d950c8d56740f8be0acb336de1c | [
"MIT"
] | 28 | 2016-12-09T22:48:29.000Z | 2021-04-07T11:01:34.000Z | elasticsearch_django/models.py | octoenergy/elasticsearch-django | 4b24fb8bb5729d950c8d56740f8be0acb336de1c | [
"MIT"
] | 31 | 2017-01-30T12:31:47.000Z | 2022-02-03T17:22:03.000Z | from __future__ import annotations
import logging
import time
from typing import TYPE_CHECKING, Any, cast
from django.conf import settings
from django.core.cache import cache
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from django.db.models.expressions import RawSQL
from dj... | 38.144928 | 107 | 0.630129 |
2ec51f1fcefc39d0874be31fed348978df5a89a0 | 3,517 | py | Python | pyleecan/Methods/Machine/Machine/check.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Methods/Machine/Machine/check.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Methods/Machine/Machine/check.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | # -*- coding: utf-8 -*-
from ....Methods.Machine import MachineCheckError
def check(self):
"""Check that the Machine object is correct
Parameters
----------
self :
A Machine object
Returns
-------
None
Raises
_______
MC_AbstractError
Machine is an abstract c... | 18.510526 | 86 | 0.607336 |
28d7436d7dccf88d4e5459e3bf14cfc026e2bd63 | 8,389 | py | Python | TicTacToe.py | sheetal322/HacktoberFest-2021 | 6e7f2a0e5650e681ac45051e08305c3371822e41 | [
"MIT"
] | null | null | null | TicTacToe.py | sheetal322/HacktoberFest-2021 | 6e7f2a0e5650e681ac45051e08305c3371822e41 | [
"MIT"
] | null | null | null | TicTacToe.py | sheetal322/HacktoberFest-2021 | 6e7f2a0e5650e681ac45051e08305c3371822e41 | [
"MIT"
] | null | null | null | def default():
print("\nWelcome! Let's play TIC TAC TOE!\n")
def rules():
print("The board will look like this!")
print("The positions of this 3 x 3 board is same as the right side of your key board.\n")
print(" 7 | 8 | 9 ")
print("-----------")
print(" 4 | 5 | 6 ")
print("-----------")
... | 28.631399 | 142 | 0.479318 |
6cedbca787c1d1a314ca83bf1685027e126158e5 | 2,128 | py | Python | numpoly/array_function/stack.py | jonathf/npoly | 9df4bd2a3b134e8a196e24389c0ad84c26da9662 | [
"BSD-2-Clause"
] | 8 | 2019-12-13T23:54:33.000Z | 2021-11-08T22:44:25.000Z | numpoly/array_function/stack.py | jonathf/npoly | 9df4bd2a3b134e8a196e24389c0ad84c26da9662 | [
"BSD-2-Clause"
] | 54 | 2019-08-25T20:03:10.000Z | 2021-08-09T08:59:27.000Z | numpoly/array_function/stack.py | jonathf/npoly | 9df4bd2a3b134e8a196e24389c0ad84c26da9662 | [
"BSD-2-Clause"
] | 2 | 2020-03-05T12:03:28.000Z | 2021-03-07T16:56:09.000Z | """Join a sequence of arrays along a new axis."""
from __future__ import annotations
from typing import Optional, Sequence
import numpy
import numpoly
from ..baseclass import ndpoly, PolyLike
from ..dispatch import implements
@implements(numpy.stack)
def stack(
arrays: Sequence[PolyLike],
axis: int = 0,
... | 31.294118 | 79 | 0.580357 |
127bddc5ae34c1b81eb59f19f896474840c54351 | 9,369 | py | Python | tests/plugins/lti_consumer/test_forms.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 174 | 2018-04-14T23:36:01.000Z | 2022-03-10T09:27:01.000Z | tests/plugins/lti_consumer/test_forms.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 631 | 2018-04-04T11:28:53.000Z | 2022-03-31T11:18:31.000Z | tests/plugins/lti_consumer/test_forms.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 64 | 2018-06-27T08:35:01.000Z | 2022-03-10T09:27:43.000Z | """
Forms tests
"""
from unittest import mock
from django.test import TestCase, override_settings
import exrex
from richie.plugins.lti_consumer.factories import LTIConsumerFactory
from richie.plugins.lti_consumer.forms import LTIConsumerForm
def get_lti_settings(is_regex=True):
"""Returns LTI provider settings... | 37.031621 | 97 | 0.558224 |
e1b3b0ec315c664b553c9bd34e6b7b9acc604506 | 577 | py | Python | testApp/views.py | Wizmann/DjangoSimditor | ced23966e5fab03921e059737e1abb40b72b6cea | [
"MIT"
] | 1 | 2017-12-07T05:27:56.000Z | 2017-12-07T05:27:56.000Z | testApp/views.py | Wizmann/DjangoSimditor | ced23966e5fab03921e059737e1abb40b72b6cea | [
"MIT"
] | null | null | null | testApp/views.py | Wizmann/DjangoSimditor | ced23966e5fab03921e059737e1abb40b72b6cea | [
"MIT"
] | null | null | null | #coding=utf-8
from django.shortcuts import render
from django.views.generic import View, ListView, CreateView, UpdateView
from django.core.urlresolvers import reverse_lazy
from testApp.models import Blog
class HomeView(ListView):
context_object_name = 'blog_list'
queryset = Blog.objects.all()
template_nam... | 24.041667 | 71 | 0.757366 |
36c63418922d2aba0e84303cb7b4d5ec32d2ae31 | 1,417 | py | Python | Src/arch.py | Darth-Ness/GraphicMan | b3824631f2f6e3b6fbfd052f636b1f5f0c6bfc42 | [
"CC0-1.0"
] | 1 | 2022-03-18T18:21:46.000Z | 2022-03-18T18:21:46.000Z | Src/arch.py | Darth-Ness/GraphicMan | b3824631f2f6e3b6fbfd052f636b1f5f0c6bfc42 | [
"CC0-1.0"
] | 1 | 2022-03-18T18:25:52.000Z | 2022-03-24T21:23:01.000Z | Src/arch.py | Darth-Ness/GraphicMan | b3824631f2f6e3b6fbfd052f636b1f5f0c6bfc42 | [
"CC0-1.0"
] | 1 | 2022-03-18T18:22:08.000Z | 2022-03-18T18:22:08.000Z | import tkinter
import os
def install():
os.system('sudo pacman -S' + " " + packageName.get())
def uninstall():
os.system('sudo pacman -Rs' + " " + packageName.get())
def update():
os.system('sudo pacman -Syu')
def info():
os.system('sudo pacman -Qi' + " " + packageName.get())
def search():
os.s... | 28.34 | 82 | 0.700776 |
c4d4c860b96318deb86241fce4873aff08c57bb7 | 746 | py | Python | tests/trackings/test_list.py | ludeeus/pyaftership | aba525b408c7e83167d6891d9c9e68842b2a0c13 | [
"MIT"
] | null | null | null | tests/trackings/test_list.py | ludeeus/pyaftership | aba525b408c7e83167d6891d9c9e68842b2a0c13 | [
"MIT"
] | 28 | 2018-08-23T11:54:45.000Z | 2022-03-18T06:06:12.000Z | tests/trackings/test_list.py | ludeeus/pyaftership | aba525b408c7e83167d6891d9c9e68842b2a0c13 | [
"MIT"
] | 5 | 2018-08-18T16:06:55.000Z | 2021-11-04T16:14:12.000Z | """Test list trackings."""
import aiohttp
import pytest
from pyaftership import AfterShip
from tests.common import API_KEY, load_fixture
@pytest.mark.asyncio
async def test_list(aresponses):
"""Test list trackings."""
aresponses.add(
"api.aftership.com",
"/v4/trackings",
"get",
... | 27.62963 | 64 | 0.632708 |
de6a3bdd45c1766fdf18a0834a853655d0a1513e | 9,644 | py | Python | scripts/garmin_sync.py | aleung/running_page | be68da20f0dac1a1c6859ebb8efcdd2a7245159d | [
"MIT"
] | null | null | null | scripts/garmin_sync.py | aleung/running_page | be68da20f0dac1a1c6859ebb8efcdd2a7245159d | [
"MIT"
] | null | null | null | scripts/garmin_sync.py | aleung/running_page | be68da20f0dac1a1c6859ebb8efcdd2a7245159d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Python 3 API wrapper for Garmin Connect to get your statistics.
Copy most code from https://github.com/cyberjunky/python-garminconnect
"""
import argparse
import logging
import os
import time
import re
import sys
import traceback
import asyncio
import httpx
import aiofiles
from config impo... | 35.069091 | 143 | 0.619038 |
687228f99d36b463fac44100e0231bfee8560527 | 1,619 | py | Python | camera/processor/qr_detector.py | dmiyamoto/study-picamera-examples | 8f1e7b95823e1e46587f40fb94d4e033c8dbf9a8 | [
"MIT"
] | null | null | null | camera/processor/qr_detector.py | dmiyamoto/study-picamera-examples | 8f1e7b95823e1e46587f40fb94d4e033c8dbf9a8 | [
"MIT"
] | null | null | null | camera/processor/qr_detector.py | dmiyamoto/study-picamera-examples | 8f1e7b95823e1e46587f40fb94d4e033c8dbf9a8 | [
"MIT"
] | null | null | null | from imutils.video.pivideostream import PiVideoStream
import time
from datetime import datetime
import numpy as np
import cv2
from pyzbar import pyzbar
class QRDetector(object):
def __init__(self, flip = False):
self.vs = PiVideoStream(resolution=(800, 608)).start()
self.flip = flip
time.s... | 29.981481 | 84 | 0.563928 |
5dee89649359a7c5650c18d574a3078ef48d57da | 5,439 | py | Python | JobConfig/ensemble/genEnsembleFcl.py | gaponenko/Offline | 6fb26f4eab5f962126307d30b4e8336fdd117881 | [
"Apache-2.0"
] | null | null | null | JobConfig/ensemble/genEnsembleFcl.py | gaponenko/Offline | 6fb26f4eab5f962126307d30b4e8336fdd117881 | [
"Apache-2.0"
] | 1 | 2019-11-22T14:45:51.000Z | 2019-11-22T14:50:03.000Z | JobConfig/ensemble/genEnsembleFcl.py | gaponenko/Offline | 6fb26f4eab5f962126307d30b4e8336fdd117881 | [
"Apache-2.0"
] | 2 | 2019-10-14T17:46:58.000Z | 2020-03-30T21:05:15.000Z | #!/usr/bin/env python
from string import Template
import sys
import random
import os
from normalizations import *
from argparse import ArgumentParser
def generate(verbose=True,dem_emin=93,dep_emin=83,rpc_tmin=400):
# when we run from SConscript, the cwd is the python subdir
# but all file name are relative to ... | 36.503356 | 127 | 0.615738 |
7b0fb8e15fea6010ca4f7a049f6a50dbfb377177 | 938 | py | Python | Loan.py | nwautier/BeTheBank | d5066d60beb1c585eee341a4a05452b6de70f1f7 | [
"MIT"
] | null | null | null | Loan.py | nwautier/BeTheBank | d5066d60beb1c585eee341a4a05452b6de70f1f7 | [
"MIT"
] | null | null | null | Loan.py | nwautier/BeTheBank | d5066d60beb1c585eee341a4a05452b6de70f1f7 | [
"MIT"
] | null | null | null | class Loan:
'Base class for all loans.'
LoanCount = 0
def __init__(self, m, y, v, r, score, term):
LoanCount += 1
self.PolicyNumber = LoanCount
self.OriginMonth = m
self.OriginYear = y
self.OriginValue = v
self.PrincipalValue = v
self.Balance = v
... | 30.258065 | 141 | 0.581023 |
5f82f08a43f853462bf07c53fa1487f8d98d7324 | 2,370 | py | Python | byceps/services/seating/dbmodels/seat.py | GyBraLAN/byceps | b53087849c10a531b66d08999116fa1bef312a7f | [
"BSD-3-Clause"
] | null | null | null | byceps/services/seating/dbmodels/seat.py | GyBraLAN/byceps | b53087849c10a531b66d08999116fa1bef312a7f | [
"BSD-3-Clause"
] | null | null | null | byceps/services/seating/dbmodels/seat.py | GyBraLAN/byceps | b53087849c10a531b66d08999116fa1bef312a7f | [
"BSD-3-Clause"
] | null | null | null | """
byceps.services.seating.dbmodels.seat
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from collections import namedtuple
from typing import Optional, TYPE_CHECKING
if TYPE_CHECKING:
hybrid_property = property
else:
... | 28.902439 | 103 | 0.643038 |
70ca704d54949bd4d2dafea81e3f868dee626375 | 2,665 | py | Python | pybud/video/video_config_handler.py | vishal2612200/PyBud | 726c83ce85cf6dd42a2aaa2eb06609efd6a3fc1b | [
"MIT"
] | 11 | 2020-01-23T08:30:15.000Z | 2022-02-11T04:12:30.000Z | pybud/video/video_config_handler.py | vishal2612200/PyBud | 726c83ce85cf6dd42a2aaa2eb06609efd6a3fc1b | [
"MIT"
] | 5 | 2020-02-15T16:44:24.000Z | 2022-01-13T02:07:48.000Z | pybud/video/video_config_handler.py | vishal2612200/PyBud | 726c83ce85cf6dd42a2aaa2eb06609efd6a3fc1b | [
"MIT"
] | 3 | 2020-02-15T16:30:02.000Z | 2020-08-19T06:58:35.000Z | from pathlib import Path
import yaml
from PIL import ImageFont
class VideoCFG(object):
def __init__(self, config_path):
with open(config_path, "r") as f:
self.yml: dict = yaml.load(f, Loader=yaml.FullLoader)
self.FONT_DIR = Path(__file__).parent / ".." / "fonts"
# Color schem... | 35.065789 | 131 | 0.611257 |
179d054095f219bf22e45add9d6265e9e25f744e | 194 | py | Python | plan_backend/apps.py | 1uy31/plan | 66f0b1dff7f9704acb8cc97d838e1a331d6b4ec9 | [
"MIT"
] | null | null | null | plan_backend/apps.py | 1uy31/plan | 66f0b1dff7f9704acb8cc97d838e1a331d6b4ec9 | [
"MIT"
] | null | null | null | plan_backend/apps.py | 1uy31/plan | 66f0b1dff7f9704acb8cc97d838e1a331d6b4ec9 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PlanBackendConfig(AppConfig):
"""AppConfig for plan_backend."""
default_auto_field = "django.db.models.BigAutoField"
name = "plan_backend"
| 21.555556 | 56 | 0.742268 |
cd905ee940773e60ca7bfa4010bf1468e2bc90ea | 525 | py | Python | resrc/search/views.py | theWhiteFox/resrc | d62bcf3ba2a55f50ae38a1e606072ee3d6025da5 | [
"MIT"
] | 274 | 2015-01-02T08:57:58.000Z | 2022-03-11T11:44:44.000Z | resrc/search/views.py | ninjaCheery/resrc | 8af3a1a3617fd305a2c8aecffb609ed3e9c1addc | [
"MIT"
] | 8 | 2015-05-19T02:54:49.000Z | 2016-07-07T18:10:40.000Z | resrc/search/views.py | ninjaCheery/resrc | 8af3a1a3617fd305a2c8aecffb609ed3e9c1addc | [
"MIT"
] | 112 | 2015-01-03T18:59:23.000Z | 2019-10-08T11:49:18.000Z | #-*- coding: utf-8 -*-:
from django.shortcuts import render
from forms import LinksSearchForm
def search(request):
if 'q' in request.GET:
query = request.GET['q']
else:
query = ''
# we retrieve the query to display it in the template
form = LinksSearchForm(request.GET)
# we call ... | 23.863636 | 79 | 0.632381 |
03b6cd4dbc1c3789b3149cb9288ac4aaac85e633 | 697 | py | Python | secedgar/utils/cik_map.py | mjdhasan/sec-edgar | 51ee1639641f6dfb7b1c7b8daf2c252056624957 | [
"Apache-2.0"
] | 1 | 2021-09-09T10:54:39.000Z | 2021-09-09T10:54:39.000Z | secedgar/utils/cik_map.py | DijunLiu1995/sec-edgar | 51ee1639641f6dfb7b1c7b8daf2c252056624957 | [
"Apache-2.0"
] | null | null | null | secedgar/utils/cik_map.py | DijunLiu1995/sec-edgar | 51ee1639641f6dfb7b1c7b8daf2c252056624957 | [
"Apache-2.0"
] | null | null | null | import json
import requests
URL = "https://www.sec.gov/files/company_tickers.json"
def get_cik_map(key="ticker"):
"""Get dictionary of tickers to CIK numbers.
Args:
key (str): Should be either "ticker" or "title". Choosing "ticker"
will give dict with tickers as keys. Choosing "title" wi... | 29.041667 | 75 | 0.655667 |
59eb7c18a0593e47014ce44b7ab9d636611d9f01 | 884 | py | Python | service/protocol-plugin/plugins/mqtt-fan/lib/python/setup.py | mandeepshetty/iotivity | fea1aa7f7088fdf206ebc3ff587766da96836708 | [
"Apache-2.0"
] | null | null | null | service/protocol-plugin/plugins/mqtt-fan/lib/python/setup.py | mandeepshetty/iotivity | fea1aa7f7088fdf206ebc3ff587766da96836708 | [
"Apache-2.0"
] | null | null | null | service/protocol-plugin/plugins/mqtt-fan/lib/python/setup.py | mandeepshetty/iotivity | fea1aa7f7088fdf206ebc3ff587766da96836708 | [
"Apache-2.0"
] | 1 | 2022-01-22T19:42:20.000Z | 2022-01-22T19:42:20.000Z | from sys import version
from distutils.core import setup
setup(name='mosquitto',
version='1.3.1',
description='MQTT version 3.1 client class',
author='Roger Light',
author_email='roger@atchoo.org',
url='http://mosquitto.org/',
download_url='http://mosquitto.org/files/',
license='BSD License',
py_modules=['mosq... | 30.482759 | 51 | 0.613122 |
becbc4bfa76c7d05066dd6601fce7fe61f7d02e1 | 2,499 | py | Python | examples/dfp/v201611/reconciliation_report_row_service/get_reconciliation_report_rows_for_reconciliation_report.py | agencia-watermelons/googleads-python-lib | d2e55863ecf7e5090c225d74b3f4c1f948cd5a21 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201611/reconciliation_report_row_service/get_reconciliation_report_rows_for_reconciliation_report.py | agencia-watermelons/googleads-python-lib | d2e55863ecf7e5090c225d74b3f4c1f948cd5a21 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201611/reconciliation_report_row_service/get_reconciliation_report_rows_for_reconciliation_report.py | agencia-watermelons/googleads-python-lib | d2e55863ecf7e5090c225d74b3f4c1f948cd5a21 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 37.298507 | 78 | 0.712685 |
8c9c3f673cc8b7f2b9de84835462c06fde9a2d35 | 942 | py | Python | src/pretalx/submission/models/resource.py | oxinabox/pretalx | aa8cb810addd3f6f3fd6e7557497a04a51653413 | [
"Apache-2.0"
] | null | null | null | src/pretalx/submission/models/resource.py | oxinabox/pretalx | aa8cb810addd3f6f3fd6e7557497a04a51653413 | [
"Apache-2.0"
] | null | null | null | src/pretalx/submission/models/resource.py | oxinabox/pretalx | aa8cb810addd3f6f3fd6e7557497a04a51653413 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.utils.translation import ugettext_lazy as _
from django_scopes import ScopedManager
from pretalx.common.mixins import LogMixin
class Resource(LogMixin, models.Model):
"""Resources are file uploads belonging to a :class:`~pretalx.submission.models.submission.Submission`.""... | 36.230769 | 110 | 0.717622 |
dd79e8396ac219af8e401d9c7f6d9b4585b19ebc | 2,511 | py | Python | NotIncluded/Depreciated/_model_GK_Reduced.py | MattArran/GEMMES | ed48ebef08fdf740ed28248c65ed7d8239ab19c4 | [
"MIT"
] | 4 | 2021-06-28T07:11:34.000Z | 2022-01-11T13:43:17.000Z | NotIncluded/Depreciated/_model_GK_Reduced.py | DaluS/GEMMES | 10d4a062004ce5b7fd26eb8c4937d940b7d097d5 | [
"MIT"
] | 167 | 2021-06-28T07:10:21.000Z | 2022-03-18T17:30:40.000Z | NotIncluded/Depreciated/_model_GK_Reduced.py | MattArran/GEMMES | ed48ebef08fdf740ed28248c65ed7d8239ab19c4 | [
"MIT"
] | 3 | 2021-06-28T07:19:12.000Z | 2022-03-03T02:44:15.000Z | # -*- coding: utf-8 -*-
"""
Here we define the parameters and set of equation for a model of type 'GK'
All parameters can have value:
- None: set to the default value found in _def_fields.py
- scalar: int or float
- list or np.ndarray used for benchmarks
- function (callable): in that can it will be tr... | 25.622449 | 92 | 0.487853 |
262fa57ffb2ff229a5fe91ae73922d862c7d0c39 | 1,382 | py | Python | giffer.py | AKAMEDIASYSTEM/timelapse-tweeter | 88f331955ca2e1f0bd556d4d7e5ba9b4a9c9a896 | [
"MIT"
] | null | null | null | giffer.py | AKAMEDIASYSTEM/timelapse-tweeter | 88f331955ca2e1f0bd556d4d7e5ba9b4a9c9a896 | [
"MIT"
] | null | null | null | giffer.py | AKAMEDIASYSTEM/timelapse-tweeter | 88f331955ca2e1f0bd556d4d7e5ba9b4a9c9a896 | [
"MIT"
] | null | null | null | import tweepy
import sys
import requests
import random
from datetime import datetime
# figure out how to get the below twitter things
twitter_consumer_key= 'FILL_IT_IN'
twitter_consumer_secret= 'FILL_IT_IN'
twitter_access_token = 'FILL_IT_IN'
twitter_access_token_secret = 'FILL_IT_IN'
tweet_text = "{:%B %d, %Y at %H:%... | 29.404255 | 84 | 0.727207 |
a8c413e50e782a0398529afe766b3497299ef5ff | 10,855 | py | Python | music21/analysis/transposition.py | cuthbertLab/music21 | 1be16c255460107c10d7b4bc8eb77f0d115b5eac | [
"MIT"
] | 1,449 | 2015-01-09T15:53:56.000Z | 2022-03-31T18:24:46.000Z | venv/Lib/site-packages/music21/analysis/transposition.py | alimirzazadeh/wolfGANg | 5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c | [
"MIT"
] | 1,179 | 2015-01-07T17:07:54.000Z | 2022-03-31T16:46:02.000Z | music21/analysis/transposition.py | cuthbertLab/music21 | 1be16c255460107c10d7b4bc8eb77f0d115b5eac | [
"MIT"
] | 393 | 2015-01-03T20:38:16.000Z | 2022-03-25T16:51:22.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Name: transposition.py
# Purpose: Tools for checking distinct transposition
#
# Authors: Mark Gotham
#
# Copyright: Copyright © 2017 Michael Scott Cuthbert and the music21 Project
# License: ... | 40.055351 | 87 | 0.608752 |
3f7a21e37b92ab35fff4ab4d1e4e06fbe288a7b1 | 4,084 | py | Python | mnist_cifar10/utils.py | tanimutomo/evaluating-logit-pairing-methods | 5473c66cfc3c516a5d7ea99987d5a60074a3857a | [
"Apache-2.0"
] | 22 | 2018-11-30T13:30:33.000Z | 2021-08-17T20:59:01.000Z | mnist_cifar10/utils.py | tanimutomo/evaluating-logit-pairing-methods | 5473c66cfc3c516a5d7ea99987d5a60074a3857a | [
"Apache-2.0"
] | 2 | 2019-11-07T10:16:01.000Z | 2020-11-21T08:44:29.000Z | mnist_cifar10/utils.py | tanimutomo/evaluating-logit-pairing-methods | 5473c66cfc3c516a5d7ea99987d5a60074a3857a | [
"Apache-2.0"
] | 4 | 2019-03-09T17:12:12.000Z | 2021-10-04T12:58:44.000Z | import tensorflow as tf
# -------------------------------------------------------------
# Helpers
# -------------------------------------------------------------
def load_mnist(batch_size, data_dir, augmentation=False, stddev=0.0, adv_subset=1000, workers=4):
from data_loader import get_mnist
trainloader... | 39.650485 | 99 | 0.426298 |
32440d5c6671ceb08fa060d66a1f77aac954de80 | 721 | py | Python | jhubflask/utils.py | devMoxie/jhubflask | 8cbda26d4a0dbb93165d433b726ac9dd4459e0a2 | [
"BSD-3-Clause"
] | null | null | null | jhubflask/utils.py | devMoxie/jhubflask | 8cbda26d4a0dbb93165d433b726ac9dd4459e0a2 | [
"BSD-3-Clause"
] | null | null | null | jhubflask/utils.py | devMoxie/jhubflask | 8cbda26d4a0dbb93165d433b726ac9dd4459e0a2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Helper utilities and decorators."""
from flask import flash, current_app
from flask_login import current_user
from functools import wraps
def flash_errors(form, category='warning'):
"""Flash all errors for a form."""
for field, errors in form.errors.items():
for error in err... | 31.347826 | 87 | 0.662968 |
050c846dd14fbee596e9275657acc9705b8992d0 | 1,126 | py | Python | plans/fixed_ensemble_vggish_linear_2.py | dbis-uibk/MediaEval2021 | 14d754d9cea36415090aaa115db81f5ace465964 | [
"BSD-2-Clause"
] | 1 | 2022-03-31T07:28:12.000Z | 2022-03-31T07:28:12.000Z | plans/fixed_ensemble_vggish_linear_2.py | dbis-uibk/MediaEval2021 | 14d754d9cea36415090aaa115db81f5ace465964 | [
"BSD-2-Clause"
] | null | null | null | plans/fixed_ensemble_vggish_linear_2.py | dbis-uibk/MediaEval2021 | 14d754d9cea36415090aaa115db81f5ace465964 | [
"BSD-2-Clause"
] | null | null | null | """Ensemble plan manually split by type moode/theme."""
import json
from dbispipeline.evaluators import FixedSplitEvaluator
from dbispipeline.evaluators import ModelCallbackWrapper
from sklearn.pipeline import Pipeline
import numpy as np
from mediaeval2021 import common
from mediaeval2021.dataloaders.melspectrograms... | 28.15 | 93 | 0.773535 |
05a74ac994ffe3d0c7b30f466bfbff93ab348305 | 4,840 | py | Python | flex/core.py | ivlevdenis/flex | 621a5de27d3d6f97b79378be11042883f2c8994c | [
"MIT"
] | 1 | 2018-11-19T02:38:46.000Z | 2018-11-19T02:38:46.000Z | flex/core.py | javabrett/flex | 55822c2ffaa17dfa5e403d7feed898cb9bc983bb | [
"MIT"
] | null | null | null | flex/core.py | javabrett/flex | 55822c2ffaa17dfa5e403d7feed898cb9bc983bb | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from six.moves import urllib_parse as urlparse
import os
import collections
import requests
from copy import deepcopy
import six
import json
import yaml
from flex.context_managers import ErrorDict
from flex.exceptions import ValidationError
from flex.loading.definitions import... | 28.639053 | 88 | 0.663223 |
732b98527159ce10198daab7de9f2820b7faf35e | 4,641 | py | Python | pytation_examples/simple.py | jetperch/pytation | 55f2725eb20ba4fc0ea748884670763da203c698 | [
"Apache-2.0"
] | 1 | 2021-10-09T17:42:09.000Z | 2021-10-09T17:42:09.000Z | pytation_examples/simple.py | jetperch/pytation | 55f2725eb20ba4fc0ea748884670763da203c698 | [
"Apache-2.0"
] | null | null | null | pytation_examples/simple.py | jetperch/pytation | 55f2725eb20ba4fc0ea748884670763da203c698 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Jetperch LLC
#
# 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,... | 33.388489 | 111 | 0.591898 |
711b3e1d279e0667f1cf3696574b37045145a9dd | 189 | py | Python | Ch05/test79.py | pearpai/MachineLearnAction | d23def83e50bf53b7cfcdb52d362d88eb52d9115 | [
"Apache-2.0"
] | null | null | null | Ch05/test79.py | pearpai/MachineLearnAction | d23def83e50bf53b7cfcdb52d362d88eb52d9115 | [
"Apache-2.0"
] | null | null | null | Ch05/test79.py | pearpai/MachineLearnAction | d23def83e50bf53b7cfcdb52d362d88eb52d9115 | [
"Apache-2.0"
] | null | null | null | import logRegres
if __name__ == '__main__':
dataArr, labelMat = logRegres.loadDataSet()
weights = logRegres.gradAscent(dataArr, labelMat)
logRegres.plotBestFit(weights.getA())
| 27 | 53 | 0.740741 |
1cfa86ffbc58e8963b37507b7a40065a74436079 | 15,894 | py | Python | optuna/samplers/cmaes.py | uskfujino/optuna | 15a1878f80b3dc6f064d8d654509154004f9f46f | [
"MIT"
] | null | null | null | optuna/samplers/cmaes.py | uskfujino/optuna | 15a1878f80b3dc6f064d8d654509154004f9f46f | [
"MIT"
] | null | null | null | optuna/samplers/cmaes.py | uskfujino/optuna | 15a1878f80b3dc6f064d8d654509154004f9f46f | [
"MIT"
] | null | null | null | import math
import pickle
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
from cmaes import CMA
import numpy as np
import optuna
from optuna.distributions import BaseDistribution
from optuna.samplers import BaseSampler
from optuna.trial impor... | 40.545918 | 99 | 0.640242 |
188914f3b5050130055a90852086d8d1e0d9a7d8 | 894 | py | Python | ex020.py | WesleyOlliver/CursoPython | 8decdc4f38c25429994c0f9cb8f206e167f161d6 | [
"MIT"
] | null | null | null | ex020.py | WesleyOlliver/CursoPython | 8decdc4f38c25429994c0f9cb8f206e167f161d6 | [
"MIT"
] | null | null | null | ex020.py | WesleyOlliver/CursoPython | 8decdc4f38c25429994c0f9cb8f206e167f161d6 | [
"MIT"
] | null | null | null | from random import shuffle
cor = {'traço': '\033[35m', 'ex': '\033[4;31m', 'título': '\033[1;34m', 'nom': '\033[1;32m', 'reset': '\033[m'}
print('{}-=-{}'.format(cor['traço'], cor['reset'])*18, '{} Exercício 020 {}'.format(cor['ex'], cor['reset']),
'{}-=-{}'.format(cor['traço'], cor['reset'])*18)
print('{}O mesm... | 55.875 | 119 | 0.634228 |
7d2c0025ff7c069fd993d94112ce9a056fa6f500 | 37,729 | py | Python | src/cogent3/core/location.py | Phuong-Le/cogent3 | 3a2baaa77ad8a71781b8f79c04147b9693f7ebb2 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/core/location.py | Phuong-Le/cogent3 | 3a2baaa77ad8a71781b8f79c04147b9693f7ebb2 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/core/location.py | Phuong-Le/cogent3 | 3a2baaa77ad8a71781b8f79c04147b9693f7ebb2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""Alignments and Sequences are _Annotatables
_Annotatables hold a list of Maps.
Maps can be Features, Variables or AlignedSequences.
Maps have a list of Spans.
Also provides Range and Point classes for dealing with parts of sequences.
Span is a region with a start, an end, and a direction. Rang... | 31.785173 | 91 | 0.576374 |
2370b10acff98abc47c8dd813350216130ddb48b | 623 | py | Python | tests/conftest.py | c-goosen/haveibeenpwned-asyncio | 62dd32b00c441a4c6e72cb6863eb593660dcf5d5 | [
"MIT"
] | null | null | null | tests/conftest.py | c-goosen/haveibeenpwned-asyncio | 62dd32b00c441a4c6e72cb6863eb593660dcf5d5 | [
"MIT"
] | null | null | null | tests/conftest.py | c-goosen/haveibeenpwned-asyncio | 62dd32b00c441a4c6e72cb6863eb593660dcf5d5 | [
"MIT"
] | null | null | null | import pytest
import asyncio
from aresponses import ResponsesMockServer
class MockResponse:
def __init__(self, text, status):
self._text = text
self.status = status
async def text(self):
return self._text
async def __aexit__(self, exc_type, exc, tb):
pass
async def ... | 18.323529 | 56 | 0.674157 |
ac76b9bb2bb3e1d6ec437eda5003614e97b9fd1e | 390 | py | Python | login_registration_app/migrations/0002_auto_20210810_1352.py | Lstedmanfalls/BetterSelf | d903fa78b41f63c5053cef09cd127544952a2243 | [
"MIT"
] | 1 | 2021-09-21T03:08:56.000Z | 2021-09-21T03:08:56.000Z | login_registration_app/migrations/0002_auto_20210810_1352.py | Lstedmanfalls/BetterSelf | d903fa78b41f63c5053cef09cd127544952a2243 | [
"MIT"
] | null | null | null | login_registration_app/migrations/0002_auto_20210810_1352.py | Lstedmanfalls/BetterSelf | d903fa78b41f63c5053cef09cd127544952a2243 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2021-08-10 19:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('login_registration_app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='users',
name='password',... | 20.526316 | 51 | 0.605128 |
0e0da3b288d2a5a3babfde3e6828e417bd3cb569 | 3,728 | py | Python | src/cogent3/parse/gff.py | wjjmjh/cogent3 | e10f4f933921d52b000096b7c016190a1602add6 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/parse/gff.py | wjjmjh/cogent3 | e10f4f933921d52b000096b7c016190a1602add6 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/parse/gff.py | wjjmjh/cogent3 | e10f4f933921d52b000096b7c016190a1602add6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
__author__ = "Peter Maxwell"
__copyright__ = "Copyright 2007-2020, The Cogent Project"
__credits__ = [
"Peter Maxwell",
"Matthew Wakefield",
"Gavin Huttley",
"Christopher Bradley",
]
__license__ = "BSD-3"
__version__ = "2020.6.30a"
__maintainer__ = "Peter Maxwell"
__email__ = "pm6... | 28.458015 | 83 | 0.571084 |
39bba843c360ff657831178988ee9625b3815594 | 3,044 | py | Python | data/cirq_new/cirq_program/startCirq_pragma720.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_pragma720.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_pragma720.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=21
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
class Opty(cirq.PointOptimizer):
def optimization_at(
... | 34.988506 | 92 | 0.653088 |
b0aa5db6cd503307fa76a3b82626ff88d5bc6fcf | 3,578 | py | Python | docs/reST/ref/code_examples/draw_module_example.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | 2 | 2021-04-03T20:01:35.000Z | 2021-09-09T23:42:21.000Z | docs/reST/ref/code_examples/draw_module_example.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | docs/reST/ref/code_examples/draw_module_example.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | 1 | 2021-06-06T17:52:54.000Z | 2021-06-06T17:52:54.000Z | # Import a library of functions called 'pygame'
import pygame
from math import pi
# Initialize the game engine
pygame.init()
# Define the colors we will use in RGB format
BLACK = ( 0, 0, 0)
WHITE = (255, 255, 255)
BLUE = ( 0, 0, 255)
GREEN = ( 0, 255, 0)
RED = (255, 0, 0)
# Set the... | 37.663158 | 101 | 0.631638 |
a720081f1fd1a34157edf830b8e6919b387619b3 | 9,067 | py | Python | xrpl/core/binarycodec/types/path_set.py | SubCODERS/xrpl-py | 24a02d099002625794f5b6491ec2cafd872cc721 | [
"ISC"
] | 1 | 2021-04-07T16:59:01.000Z | 2021-04-07T16:59:01.000Z | xrpl/core/binarycodec/types/path_set.py | SubCODERS/xrpl-py | 24a02d099002625794f5b6491ec2cafd872cc721 | [
"ISC"
] | 2 | 2022-02-23T22:57:46.000Z | 2022-02-24T11:41:49.000Z | xrpl/core/binarycodec/types/path_set.py | SubCODERS/xrpl-py | 24a02d099002625794f5b6491ec2cafd872cc721 | [
"ISC"
] | 1 | 2022-02-21T07:36:36.000Z | 2022-02-21T07:36:36.000Z | """Codec for serializing and deserializing PathSet fields.
See `PathSet Fields <https://xrpl.org/serialization.html#pathset-fields>`_
"""
from __future__ import annotations
from typing import Dict, List, Optional, Type, cast
from typing_extensions import Final
from xrpl.core.binarycodec.binary_wrappers.binary_parse... | 31.814035 | 88 | 0.607698 |
b0ef99111b81078b6a9506250df0d163cc3e5aeb | 8,717 | py | Python | lynx_code/plugins/cosigner_pool/qt.py | enkrypter/Lynx-wallet | 166b7e5810f017a6e12bf96e54b0d44767b2a901 | [
"MIT"
] | null | null | null | lynx_code/plugins/cosigner_pool/qt.py | enkrypter/Lynx-wallet | 166b7e5810f017a6e12bf96e54b0d44767b2a901 | [
"MIT"
] | null | null | null | lynx_code/plugins/cosigner_pool/qt.py | enkrypter/Lynx-wallet | 166b7e5810f017a6e12bf96e54b0d44767b2a901 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2014 Thomas Voegtlin
#
# 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... | 37.093617 | 119 | 0.618103 |
b6f77ff249148b933230f2a7464cdf92cbed90eb | 4,833 | py | Python | neutron/services/trunk/drivers/linuxbridge/agent/trunk_plumber.py | congnt95/neutron | 6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1 | [
"Apache-2.0"
] | 1,080 | 2015-01-04T08:35:00.000Z | 2022-03-27T09:15:52.000Z | neutron/services/trunk/drivers/linuxbridge/agent/trunk_plumber.py | congnt95/neutron | 6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1 | [
"Apache-2.0"
] | 24 | 2015-02-21T01:48:28.000Z | 2021-11-26T02:38:56.000Z | neutron/services/trunk/drivers/linuxbridge/agent/trunk_plumber.py | congnt95/neutron | 6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1 | [
"Apache-2.0"
] | 1,241 | 2015-01-02T10:47:10.000Z | 2022-03-27T09:42:23.000Z | #
# 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
# ... | 41.307692 | 79 | 0.660252 |
c8fa67c408151c43dd73d74b15e738ae157ad9b1 | 347 | py | Python | benchmarks/LUD K1/config.py | DependableSystemsLab/GPU-Trident | c734cd8a18146869fc915af73a6ca13ceca35c0b | [
"MIT"
] | 1 | 2021-01-17T10:36:21.000Z | 2021-01-17T10:36:21.000Z | benchmarks/LUD K1/config.py | DependableSystemsLab/GPU-Trident | c734cd8a18146869fc915af73a6ca13ceca35c0b | [
"MIT"
] | null | null | null | benchmarks/LUD K1/config.py | DependableSystemsLab/GPU-Trident | c734cd8a18146869fc915af73a6ca13ceca35c0b | [
"MIT"
] | null | null | null | import os
PROGRAM_NAME = "lud"
PROGRAM_OUTPUT_NAME = ""
INPUT_PARAMETERS = "-i 64.dat"
LLVM_PATH = ""
EXEC_MODE = 1 # 0 -> Single threaded, 1 -> Multi-threaded
CF_STAGE_1_NUM = 100
CF_STAGE_2_NUM = 100
# Loads that transfer data from global memory
GLOBAL_LOAD_LIST = [13]
# Stores that transfer data to global memor... | 21.6875 | 57 | 0.740634 |
60e68e8b7cadab58e43d9d59a5510e31ec5752b9 | 3,314 | py | Python | homeassistant/auth/permissions/util.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/auth/permissions/util.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/auth/permissions/util.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Helpers to deal with permissions."""
from __future__ import annotations
from collections.abc import Callable
from functools import wraps
from typing import Optional, cast
from .const import SUBCAT_ALL
from .models import PermissionLookup
from .types import CategoryType, SubCategoryDict, ValueType
LookupFunc = Cal... | 29.327434 | 88 | 0.667773 |
df14fa0fd5a66f7386aa37c5e726ce49ea98d4de | 825 | py | Python | blog/api.py | sepehrab1996/flask_project_maktab_53 | dd9421e0505d1ff9100ae65f9fb59613f5c93d3b | [
"BSD-3-Clause"
] | 1 | 2021-08-13T18:48:41.000Z | 2021-08-13T18:48:41.000Z | blog/api.py | parsarmx/flask_project_maktab_53 | f75d571b7bbeee5ecc063828dab6f73bd02f40d8 | [
"BSD-3-Clause"
] | null | null | null | blog/api.py | parsarmx/flask_project_maktab_53 | f75d571b7bbeee5ecc063828dab6f73bd02f40d8 | [
"BSD-3-Clause"
] | 1 | 2021-08-12T22:17:21.000Z | 2021-08-12T22:17:21.000Z | from flask import Blueprint
bp = Blueprint("api", __name__)
@bp.route("/posts_list/")
def list_post():
return "return list of posts with details for use home page"
@bp.route("/post-delete/<int:post_id>/")
def post_delete(post_id):
return f'post {post_id} deleted'
@bp.route("/post-deactive/<int:post_id>/"... | 18.75 | 64 | 0.688485 |
c17b8b7389600b2913d017a12e3686e4591bbae3 | 2,045 | py | Python | lib/surface/domains/registrations/authorization_code/get.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/domains/registrations/authorization_code/get.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/domains/registrations/authorization_code/get.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 2020 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.258621 | 77 | 0.763325 |
ea35410b6271560a55e1325a9af1ca3b3cf0e4c7 | 814 | py | Python | pyshare/urls.py | KennyStryker/Pyshare | 5ca7916a83294ec92137026b3b186c5dcd3bcacb | [
"MIT"
] | null | null | null | pyshare/urls.py | KennyStryker/Pyshare | 5ca7916a83294ec92137026b3b186c5dcd3bcacb | [
"MIT"
] | null | null | null | pyshare/urls.py | KennyStryker/Pyshare | 5ca7916a83294ec92137026b3b186c5dcd3bcacb | [
"MIT"
] | null | null | null | """pyshare URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/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... | 33.916667 | 77 | 0.706388 |
1e2fb3ad373d2d8888b4dda9b681ae125dfe4db3 | 1,660 | py | Python | surveys/migrations/0006_auto_20190730_1523.py | kumarshivam12/survey_django | 40ae9aa1f479f0ad3dca9a5851e587744834069c | [
"MIT"
] | null | null | null | surveys/migrations/0006_auto_20190730_1523.py | kumarshivam12/survey_django | 40ae9aa1f479f0ad3dca9a5851e587744834069c | [
"MIT"
] | 6 | 2020-03-25T16:58:30.000Z | 2021-06-10T19:55:55.000Z | surveys/migrations/0006_auto_20190730_1523.py | kumarshivam12/survey_django | 40ae9aa1f479f0ad3dca9a5851e587744834069c | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-30 15:23
import datetime
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
def add_default_survey(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration ... | 36.086957 | 115 | 0.624096 |
fc8d8736675bf99fe57ddb9def00daa2bf65a3d8 | 2,254 | py | Python | kivymd_akivymd_sylvia_dynamic/uix/fitimage.py | kengoon/KivyMD-AKivymd-Sylvia-Dynamic | ddd5252bb5e0fd8380076142f8c8301ad3968dac | [
"MIT"
] | 1 | 2021-01-16T02:35:17.000Z | 2021-01-16T02:35:17.000Z | kivymd_akivymd_sylvia_dynamic/uix/fitimage.py | kengoon/KivyMD-AKivymd-Sylvia-Dynamic | ddd5252bb5e0fd8380076142f8c8301ad3968dac | [
"MIT"
] | null | null | null | kivymd_akivymd_sylvia_dynamic/uix/fitimage.py | kengoon/KivyMD-AKivymd-Sylvia-Dynamic | ddd5252bb5e0fd8380076142f8c8301ad3968dac | [
"MIT"
] | null | null | null | """
Fit Image
=========
Feature to automatically crop a `Kivy` image to fit your layout
Write by Benedikt Zwölfer
Referene - https://gist.github.com/benni12er/95a45eb168fc33a4fcd2d545af692dad
Example:
========
BoxLayout:
size_hint_y: None
height: dp(200)
orientation: 'vertical'
... | 26.517647 | 103 | 0.627773 |
5308e189f0303cdef7b4697501c3cd434cdfdbc7 | 24 | py | Python | pyhiveapi/apyhiveapi/api/__init__.py | ms32035/Pyhiveapi | c84389aa8118acd006a4b228e58b6a966e49e7dc | [
"MIT"
] | 10 | 2020-12-03T14:23:56.000Z | 2022-02-01T10:48:42.000Z | pyhiveapi/apyhiveapi/api/__init__.py | ms32035/Pyhiveapi | c84389aa8118acd006a4b228e58b6a966e49e7dc | [
"MIT"
] | 65 | 2020-12-24T02:09:56.000Z | 2022-03-28T20:09:01.000Z | pyhiveapi/apyhiveapi/api/__init__.py | ms32035/Pyhiveapi | c84389aa8118acd006a4b228e58b6a966e49e7dc | [
"MIT"
] | 8 | 2020-10-05T18:55:41.000Z | 2021-03-04T23:45:05.000Z | """__init__.py file."""
| 12 | 23 | 0.583333 |
00878759072a723d610a5843199b12de39967ccd | 2,265 | py | Python | numba_dpcomp/numba_dpcomp/mlir/vectorize.py | nbpatel/mlir-extensions | 1270a2550694a53a0c70fd5b17d518eef133802b | [
"Apache-2.0"
] | null | null | null | numba_dpcomp/numba_dpcomp/mlir/vectorize.py | nbpatel/mlir-extensions | 1270a2550694a53a0c70fd5b17d518eef133802b | [
"Apache-2.0"
] | null | null | null | numba_dpcomp/numba_dpcomp/mlir/vectorize.py | nbpatel/mlir-extensions | 1270a2550694a53a0c70fd5b17d518eef133802b | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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 wr... | 29.038462 | 74 | 0.680353 |
7c70715ce5b0476654b586e7a26d65750fa5d4dc | 2,564 | py | Python | rpc/transfer.py | ninjadq/Windows-Agent | 3c165622511bae2a0542f070745d295bc14b538d | [
"Apache-2.0"
] | 60 | 2016-09-29T05:30:00.000Z | 2020-11-27T15:23:47.000Z | rpc/transfer.py | laiwei/Windows-Agent | 3c165622511bae2a0542f070745d295bc14b538d | [
"Apache-2.0"
] | 6 | 2016-10-10T05:35:22.000Z | 2019-10-12T05:35:43.000Z | rpc/transfer.py | laiwei/Windows-Agent | 3c165622511bae2a0542f070745d295bc14b538d | [
"Apache-2.0"
] | 27 | 2016-09-23T11:31:04.000Z | 2020-11-03T06:24:29.000Z | import random
import socket
import itertools
import logging
from client import JSONClient
from utils import g
transfer_rpc_clients = {}
class TransferJSONClient(JSONClient):
def __init__(self, addr):
super(TransferJSONClient, self).__init__(addr)
self.addr = addr
def insure_... | 30.52381 | 89 | 0.583853 |
93a3d7b148262c9865692fc4ab114f82ca7096b5 | 14,056 | py | Python | teekkari.py | liljaj/imneversorry | edc380da32590b7c44408500518358c46310b03f | [
"MIT"
] | null | null | null | teekkari.py | liljaj/imneversorry | edc380da32590b7c44408500518358c46310b03f | [
"MIT"
] | null | null | null | teekkari.py | liljaj/imneversorry | edc380da32590b7c44408500518358c46310b03f | [
"MIT"
] | null | null | null | import requests
import urllib
import random
import re
import db
import time
import datetime
import json
import hashlib
import emoji
from emoji import unicode_codes
class Teekkari:
def __init__(self):
self.commands = {
'vituttaa': self.getVitutus,
'viisaus': self.getViisaus,
... | 45.934641 | 200 | 0.586725 |
2939e7e64567b33083035a8c7bc498a00be92745 | 335 | py | Python | helpers.py | AndreMacedo88/VEnCode-App | 573531531f142c6207bc9156f0faa1c29159f3fa | [
"BSD-3-Clause"
] | null | null | null | helpers.py | AndreMacedo88/VEnCode-App | 573531531f142c6207bc9156f0faa1c29159f3fa | [
"BSD-3-Clause"
] | null | null | null | helpers.py | AndreMacedo88/VEnCode-App | 573531531f142c6207bc9156f0faa1c29159f3fa | [
"BSD-3-Clause"
] | null | null | null | import wx
def question_exit_safely(frame):
question = wx.MessageBox('Are you sure you want to quit?', 'Exit VEnCode',
wx.YES_NO | wx.NO_DEFAULT, frame)
if question == wx.YES:
frame.Close()
def panel_normal_layout(panel):
panel.SetAutoLayout(True)
panel.Layout()
... | 22.333333 | 78 | 0.620896 |
74e529e160a2c9f003641c047f2a18a428ef64dd | 3,033 | py | Python | analysis.py | xavidram/FrequencyAnalyzerPhidget | bc387947719738b46287c79b44498a3efe21a83a | [
"Unlicense"
] | 1 | 2019-02-12T19:43:43.000Z | 2019-02-12T19:43:43.000Z | analysis.py | xavidram/FrequencyAnalyzerPhidget | bc387947719738b46287c79b44498a3efe21a83a | [
"Unlicense"
] | null | null | null | analysis.py | xavidram/FrequencyAnalyzerPhidget | bc387947719738b46287c79b44498a3efe21a83a | [
"Unlicense"
] | null | null | null | ####
# Author: Xavid Ramirez
# Email: xavidram@hotmail.com
# Alt Email: xavid.ramirez01@utrgv.edu
# Script Summary: This script will sample values
# from a vibration sensors at a
# desired sampling fequency.
# License: MIT => https://tldrlegal.com/license/mit-license
####
import u3
import threading
import... | 31.926316 | 121 | 0.70755 |
b95d46ac68646796a18f937c9afd91618dfd7969 | 9,718 | py | Python | ct/py/json_summary_combiner.py | FeliciaXmL/skia-buildbot | 446c1910507adcdad6ac52bee623400d158df363 | [
"BSD-3-Clause"
] | null | null | null | ct/py/json_summary_combiner.py | FeliciaXmL/skia-buildbot | 446c1910507adcdad6ac52bee623400d158df363 | [
"BSD-3-Clause"
] | 21 | 2022-02-13T21:21:58.000Z | 2022-03-02T10:01:09.000Z | ct/py/json_summary_combiner.py | FeliciaXmL/skia-buildbot | 446c1910507adcdad6ac52bee623400d158df363 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Module that combines JSON summaries and outputs the summaries in HTML."""
import glob
import json
import optparse
import os
imp... | 41.529915 | 80 | 0.746244 |
e60b7bc33f755ceeef3bf3ac06e323a9eeeb6766 | 651 | py | Python | python/DL_for_HTT/common/model_inputs/PuppiMET_with_METcov_j1j2jr_Npu_no_mT.py | lucastorterotot/DL_for_HTT_mass | 2aff7741b5f497114dd826f9b167f66f2cdaa329 | [
"MIT"
] | 1 | 2021-09-22T09:45:49.000Z | 2021-09-22T09:45:49.000Z | python/DL_for_HTT/common/model_inputs/PuppiMET_with_METcov_j1j2jr_Npu_no_mT.py | dzuolo/DL_for_HTT_mass | 79d56f3fa5b44642c9c64ffdadf5d87325ad032f | [
"MIT"
] | null | null | null | python/DL_for_HTT/common/model_inputs/PuppiMET_with_METcov_j1j2jr_Npu_no_mT.py | dzuolo/DL_for_HTT_mass | 79d56f3fa5b44642c9c64ffdadf5d87325ad032f | [
"MIT"
] | 1 | 2021-06-17T07:46:29.000Z | 2021-06-17T07:46:29.000Z | inputs = [
"tau1_pt_reco",
"tau1_eta_reco",
"tau1_phi_reco",
"tau2_pt_reco",
"tau2_eta_reco",
"tau2_phi_reco",
"jet1_pt_reco",
"jet1_eta_reco",
"jet1_phi_reco",
"jet2_pt_reco",
"jet2_eta_reco",
"jet2_phi_reco",
"remaining_jets_pt_reco",
"remaining_jets_eta_reco",
... | 21.7 | 30 | 0.635945 |
29565a091c70b332f38d2ba9d4d41c89f39a3c8d | 632 | py | Python | examples/__init__.py | sapshah-cisco/cobra | e2b5a75495931844180b05d776c15829e63f0dab | [
"Apache-2.0"
] | 93 | 2015-02-11T01:41:22.000Z | 2022-02-03T22:55:57.000Z | examples/__init__.py | sapshah-cisco/cobra | e2b5a75495931844180b05d776c15829e63f0dab | [
"Apache-2.0"
] | 112 | 2015-02-23T22:20:29.000Z | 2022-03-22T21:46:52.000Z | examples/__init__.py | sapshah-cisco/cobra | e2b5a75495931844180b05d776c15829e63f0dab | [
"Apache-2.0"
] | 61 | 2015-02-22T01:34:01.000Z | 2022-01-19T09:50:21.000Z | # Copyright 2015 Cisco Systems, 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 ... | 39.5 | 74 | 0.751582 |
f970152cd506829e3db32b4522e086cf58ae60a6 | 1,144 | py | Python | AnalyzeImage.py | emilia-smolko/serverless-ai | e7cce73cd34e66917efbc5d5f993c26deafa093a | [
"MIT"
] | null | null | null | AnalyzeImage.py | emilia-smolko/serverless-ai | e7cce73cd34e66917efbc5d5f993c26deafa093a | [
"MIT"
] | null | null | null | AnalyzeImage.py | emilia-smolko/serverless-ai | e7cce73cd34e66917efbc5d5f993c26deafa093a | [
"MIT"
] | null | null | null | import json
import boto3
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
rekognition = boto3.client('rekognition')
s3 = boto3.client('s3')
def lambda_handler(event, context):
logger.info('Starting Analyzing Image for event: %s', event)
bucket = event['Records'][0]['s3']['bucket']['n... | 28.6 | 127 | 0.631993 |
8775fb1a59d61480629e91ce96942e3e87a15b17 | 12,059 | py | Python | rclpy/rclpy/qos.py | j-rivero/rclpy | 30eeae9b30ab15209798d62b501d1dec633e1db3 | [
"Apache-2.0"
] | null | null | null | rclpy/rclpy/qos.py | j-rivero/rclpy | 30eeae9b30ab15209798d62b501d1dec633e1db3 | [
"Apache-2.0"
] | null | null | null | rclpy/rclpy/qos.py | j-rivero/rclpy | 30eeae9b30ab15209798d62b501d1dec633e1db3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2017 Open Source Robotics Foundation, 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 applicabl... | 31.902116 | 97 | 0.696161 |
08d6629c78adb4a596f7c7a9cd3ca0fca6d141d1 | 3,189 | py | Python | python/paddle/tests/dist_hapi_mnist_dynamic.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/tests/dist_hapi_mnist_dynamic.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/tests/dist_hapi_mnist_dynamic.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-12-09T08:59:17.000Z | 2021-12-09T08:59:17.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 30.663462 | 75 | 0.655378 |
22e647a7e0dc59cf1ac33d91f7b48dc6f5fb9127 | 1,724 | py | Python | frontend/animation/util.py | eldstal/CTF | 29ae870a362257c132ee729befbed86473cfb21d | [
"MIT"
] | null | null | null | frontend/animation/util.py | eldstal/CTF | 29ae870a362257c132ee729befbed86473cfb21d | [
"MIT"
] | 2 | 2021-02-07T21:31:09.000Z | 2021-02-18T10:33:01.000Z | frontend/animation/util.py | eldstal/CTF | 29ae870a362257c132ee729befbed86473cfb21d | [
"MIT"
] | null | null | null | from asciimatics.effects import Effect
from asciimatics.screen import Screen
RAINBOW_256 = [ 160, 196, 202, 208, 214, 220, 226,
192, 191, 190,120, 119, 118, 82, 46,
49, 51, 45, 39, 33, 27, 21, 19, 55,
56, 57, 128, 129, 165, 52, 88 ]
RAINBOW_8 = [
Screen.C... | 31.925926 | 108 | 0.526102 |
5393c76593bab6c8b4d0589e66085ef812a754da | 20,494 | py | Python | cyberbattle/agents/baseline/agent_dql.py | br0kej/CyberBattleSim | 4663616c5348f6ea87e788f53b0a0da75fe83c60 | [
"MIT"
] | 1 | 2021-04-16T06:31:58.000Z | 2021-04-16T06:31:58.000Z | cyberbattle/agents/baseline/agent_dql.py | br0kej/CyberBattleSim | 4663616c5348f6ea87e788f53b0a0da75fe83c60 | [
"MIT"
] | null | null | null | cyberbattle/agents/baseline/agent_dql.py | br0kej/CyberBattleSim | 4663616c5348f6ea87e788f53b0a0da75fe83c60 | [
"MIT"
] | 1 | 2021-11-11T14:04:01.000Z | 2021-11-11T14:04:01.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Function DeepQLearnerPolicy.optimize_model:
# Copyright (c) 2017, Pytorch contributors
# All rights reserved.
# https://github.com/pytorch/tutorials/blob/master/LICENSE
"""Deep Q-learning agent applied to chain network (notebook)
This no... | 41.82449 | 118 | 0.664682 |
4402cb1bf4dd13a5fc7c305cb6f3f23483acebbd | 6,427 | py | Python | Archive/new_working_set.py | dtn067/cms-git-set | df7a810225e717a20324556ab48e566f8a59be63 | [
"MIT"
] | null | null | null | Archive/new_working_set.py | dtn067/cms-git-set | df7a810225e717a20324556ab48e566f8a59be63 | [
"MIT"
] | null | null | null | Archive/new_working_set.py | dtn067/cms-git-set | df7a810225e717a20324556ab48e566f8a59be63 | [
"MIT"
] | 2 | 2019-04-08T16:27:15.000Z | 2019-04-08T16:29:47.000Z | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from __future__ import print_function
import datetime
from functools import reduce
import os
import pandas as pd
import numpy as np
#get_ipython().run_line_magic('matplotlib', 'tk')
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# In[2]:
# Tu... | 27.943478 | 114 | 0.690369 |
8f2008c035c11d5297daa69e9c3dc46fcf3760d7 | 4,729 | py | Python | src/main.py | LiamTyler/ClimbingWallLEDController | 99e65ab44e9bd84ac3dbe76ba4a3d66f24ba3c9e | [
"MIT"
] | null | null | null | src/main.py | LiamTyler/ClimbingWallLEDController | 99e65ab44e9bd84ac3dbe76ba4a3d66f24ba3c9e | [
"MIT"
] | null | null | null | src/main.py | LiamTyler/ClimbingWallLEDController | 99e65ab44e9bd84ac3dbe76ba4a3d66f24ba3c9e | [
"MIT"
] | null | null | null | from gui_route_viewer import *
from gui_main_menu import *
from gui_route_creator import *
from gui_route_details_form import *
from routes import *
from routeStore import *
from lights import *
STENCIL_FONT = QFont( QFont( 'Arial', 16 ) )
STENCIL_FONT.setBold( True )
WINDOW_SIZE = (600, 800)
class RouteListItem( QL... | 38.447154 | 101 | 0.629943 |
1581bc8cf5d63fce3c72d7b0369c6eb36fe92b5c | 452 | py | Python | src/quote/views.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | src/quote/views.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | src/quote/views.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | 1 | 2020-10-03T22:13:54.000Z | 2020-10-03T22:13:54.000Z | from databases import Database
from fastapi import APIRouter, Depends
from src.dependencies import get_db
from src.quote.models import Quote
from src.models import ListResponse
router = APIRouter()
@router.get("", response_model=ListResponse[Quote])
async def list_quotes(db: Database = Depends(get_db)):
results... | 25.111111 | 69 | 0.747788 |
fdf924a4c7898605ce5157ecbb0907e333b0287b | 3,497 | py | Python | src/Yowsup/ConnectionIO/connectionengine.py | awesomebytes/yowsup | 5eead0d56e9871fbc9de695c8ec34b1f4df7f086 | [
"MIT"
] | 7 | 2015-05-26T09:28:52.000Z | 2021-05-03T06:50:37.000Z | src/Yowsup/ConnectionIO/connectionengine.py | awesomebytes/yowsup | 5eead0d56e9871fbc9de695c8ec34b1f4df7f086 | [
"MIT"
] | null | null | null | src/Yowsup/ConnectionIO/connectionengine.py | awesomebytes/yowsup | 5eead0d56e9871fbc9de695c8ec34b1f4df7f086 | [
"MIT"
] | 9 | 2015-01-02T00:01:01.000Z | 2017-11-11T23:14:33.000Z | '''
Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com>
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 to use, copy, modify,
m... | 26.694656 | 106 | 0.691736 |
b81aefd51bd42b845df1bf33096645010300b938 | 27,774 | py | Python | zerver/tests/test_audit_log.py | sayamsamal/zulip | d26a15b14dea5a5b1a93a14a91352798c074dc5e | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_audit_log.py | sayamsamal/zulip | d26a15b14dea5a5b1a93a14a91352798c074dc5e | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_audit_log.py | sayamsamal/zulip | d26a15b14dea5a5b1a93a14a91352798c074dc5e | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
from typing import Any, Dict, Union
import orjson
from django.contrib.auth.password_validation import validate_password
from django.utils.timezone import now as timezone_now
from analytics.models import StreamCount
from zerver.lib.actions import (
bulk_add_subscriptions,
bulk_re... | 37.942623 | 111 | 0.609203 |
528410f06ad5773943e405a1f8cc20972dc2d199 | 4,716 | py | Python | utils/benchmarks/unet.py | Dauriel/weather4cast2021 | 29e818c4bcd488ec84b51558bf5392e4a887db70 | [
"Apache-2.0"
] | null | null | null | utils/benchmarks/unet.py | Dauriel/weather4cast2021 | 29e818c4bcd488ec84b51558bf5392e4a887db70 | [
"Apache-2.0"
] | null | null | null | utils/benchmarks/unet.py | Dauriel/weather4cast2021 | 29e818c4bcd488ec84b51558bf5392e4a887db70 | [
"Apache-2.0"
] | null | null | null | "UNet implementation from https://github.com/jvanvugt/pytorch-unet"
import torch
from torch import nn
import torch.nn.functional as F
class UNet(nn.Module):
def __init__(
self,
in_channels=1,
n_classes=2,
depth=5,
wf=6,
padding=False,
... | 36.276923 | 100 | 0.558948 |
e234719252edf3ce78bb1391beda64a18507ea21 | 21,250 | py | Python | VMBackup/main/freezesnapshotter.py | mbearup/azure-linux-extensions | ec6ee9a665a8140cb573dd5d1dc79804471a8401 | [
"Apache-2.0"
] | null | null | null | VMBackup/main/freezesnapshotter.py | mbearup/azure-linux-extensions | ec6ee9a665a8140cb573dd5d1dc79804471a8401 | [
"Apache-2.0"
] | null | null | null | VMBackup/main/freezesnapshotter.py | mbearup/azure-linux-extensions | ec6ee9a665a8140cb573dd5d1dc79804471a8401 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2014 Microsoft 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
#
# U... | 57.744565 | 263 | 0.694588 |
4f737bdfdc34823add388066866aa9566a9a7b93 | 85,980 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.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 ... | 52.17233 | 245 | 0.649942 |
7d113ba3f7287292d18ce22a62303b05a867a1b4 | 704 | py | Python | regulations/generator/layers/graphics.py | navigo/regulations-site | 910c24e46f4e921210a40da452dff69feae692d4 | [
"CC0-1.0"
] | 18 | 2016-09-22T05:05:16.000Z | 2021-07-28T18:13:48.000Z | regulations/generator/layers/graphics.py | navigo/regulations-site | 910c24e46f4e921210a40da452dff69feae692d4 | [
"CC0-1.0"
] | 260 | 2016-04-05T22:06:10.000Z | 2021-01-07T22:08:15.000Z | regulations/generator/layers/graphics.py | navigo/regulations-site | 910c24e46f4e921210a40da452dff69feae692d4 | [
"CC0-1.0"
] | 25 | 2016-04-06T03:26:42.000Z | 2020-10-19T16:49:23.000Z | from django.template import loader
from regulations.generator.layers import utils
from regulations.generator.layers.base import SearchReplaceLayer
class GraphicsLayer(SearchReplaceLayer):
shorthand = 'graphics'
data_source = 'graphics'
def __init__(self, layer):
self.layer = layer
self.t... | 32 | 79 | 0.691761 |
756ff6c5797d71b7565dfb6eb7c3f67fbb8c10dc | 314 | py | Python | loader/__init__.py | g8a9/contextualizing-hate-speech-models-with-explanations | d1e96891c90d4729b92d884f5c1d4d85e853b8f7 | [
"MIT"
] | null | null | null | loader/__init__.py | g8a9/contextualizing-hate-speech-models-with-explanations | d1e96891c90d4729b92d884f5c1d4d85e853b8f7 | [
"MIT"
] | null | null | null | loader/__init__.py | g8a9/contextualizing-hate-speech-models-with-explanations | d1e96891c90d4729b92d884f5c1d4d85e853b8f7 | [
"MIT"
] | null | null | null | from .gab import GabProcessor, GabDataset
from .common import *
from .ws import WSProcessor, WSDataset
from .nyt import NytProcessor, NytDataset
from .wiki import WikiProcessor, WikiDataset
from .miso import MisoProcessor, MisoDataset, MisoItaProcessor, MisoItaDataset
from .mlma import MLMAProcessor, MLMADataset
| 39.25 | 78 | 0.834395 |
74fb81e771605f4a6dca3852ffab071693dafcdb | 106 | py | Python | Ex 5-5.py | EduarDomingos/Exercisios-LB-1B | 1c4b1bf8ccf9f17a7c8bead083a47bba0385fb66 | [
"MIT"
] | null | null | null | Ex 5-5.py | EduarDomingos/Exercisios-LB-1B | 1c4b1bf8ccf9f17a7c8bead083a47bba0385fb66 | [
"MIT"
] | null | null | null | Ex 5-5.py | EduarDomingos/Exercisios-LB-1B | 1c4b1bf8ccf9f17a7c8bead083a47bba0385fb66 | [
"MIT"
] | null | null | null | n1 = float(input("Numero: "))
quintaparte = (n1/5)
print ("A quinta parte desse numero é: " , quintaparte) | 35.333333 | 55 | 0.679245 |
db46b4e4192695e73c457cb36bd275487608f760 | 1,164 | py | Python | frappe/patches/v9_1/move_feed_to_activity_log.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 5 | 2017-09-12T15:56:31.000Z | 2022-03-09T13:50:21.000Z | frappe/patches/v9_1/move_feed_to_activity_log.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 212 | 2017-08-16T13:03:18.000Z | 2020-10-06T12:26:21.000Z | frappe/patches/v9_1/move_feed_to_activity_log.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 14 | 2020-11-04T11:22:44.000Z | 2022-02-01T20:59:37.000Z | from __future__ import unicode_literals
import frappe
from frappe.utils.background_jobs import enqueue
def execute():
comm_records_count = frappe.db.count("Communication", {"comment_type": "Updated"})
if comm_records_count > 100000:
enqueue(method=move_data_from_communication_to_activity_log, queue='short', now=Tr... | 48.5 | 119 | 0.790378 |
70592f3c00cff165808bd28edbf1001595eabcee | 951 | py | Python | setup.py | hemna/vmwaretool | 5cdafee63c51614b87351b0beb8ae96f084a2459 | [
"Apache-2.0"
] | null | null | null | setup.py | hemna/vmwaretool | 5cdafee63c51614b87351b0beb8ae96f084a2459 | [
"Apache-2.0"
] | null | null | null | setup.py | hemna/vmwaretool | 5cdafee63c51614b87351b0beb8ae96f084a2459 | [
"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
# distributed under t... | 35.222222 | 69 | 0.757098 |
166af0dcd609a15f89d36294e16dd5883ed5bb2b | 9,344 | py | Python | colour/appearance/tests/test_ciecam02.py | MaxSchambach/colour | 3f3685d616fda4be58cec20bc1e16194805d7e2d | [
"BSD-3-Clause"
] | null | null | null | colour/appearance/tests/test_ciecam02.py | MaxSchambach/colour | 3f3685d616fda4be58cec20bc1e16194805d7e2d | [
"BSD-3-Clause"
] | null | null | null | colour/appearance/tests/test_ciecam02.py | MaxSchambach/colour | 3f3685d616fda4be58cec20bc1e16194805d7e2d | [
"BSD-3-Clause"
] | null | null | null | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Defines unit tests for :mod:`colour.appearance.ciecam02` module.
"""
from __future__ import division, unicode_literals
import numpy as np
from itertools import permutations
from colour.appearance import (
CIECAM02_VIEWING_CONDITIONS, CIECAM02_InductionFactors,
... | 31.355705 | 79 | 0.544842 |
1f63835089c3416888ea78643d0aa7b462cf140a | 2,884 | py | Python | analyze_crime.py | NahsiN/WalkSafe | dbfbe7ede0d1aae9420358c61b365ac5359727ca | [
"MIT"
] | 1 | 2016-09-30T01:01:43.000Z | 2016-09-30T01:01:43.000Z | analyze_crime.py | NahsiN/SafeWalk | dbfbe7ede0d1aae9420358c61b365ac5359727ca | [
"MIT"
] | null | null | null | analyze_crime.py | NahsiN/SafeWalk | dbfbe7ede0d1aae9420358c61b365ac5359727ca | [
"MIT"
] | null | null | null | """
Exploratory plots of crime data to justify app design
"""
import pandas as pd
import numpy as np
import overpass
import geopandas as gpd
import matplotlib.pyplot as plt
from ast import literal_eval as make_tuple
import psycopg2
import ipdb
import sys
import cost_models
import sys
fname = 'data/NYPD_7_Major_Felony... | 38.453333 | 122 | 0.771151 |
90332f4272ae83ee63aedd9b4438e4e3cade8389 | 3,453 | py | Python | simutator/batch_genome_mutator.py | martinghunt/simutator | 0218c8a5b37fd72eb4e5b2df4cba9f6118f96788 | [
"MIT"
] | 7 | 2020-01-09T15:25:17.000Z | 2021-08-05T15:58:25.000Z | simutator/batch_genome_mutator.py | martinghunt/simutator | 0218c8a5b37fd72eb4e5b2df4cba9f6118f96788 | [
"MIT"
] | null | null | null | simutator/batch_genome_mutator.py | martinghunt/simutator | 0218c8a5b37fd72eb4e5b2df4cba9f6118f96788 | [
"MIT"
] | 1 | 2020-01-09T13:10:02.000Z | 2020-01-09T13:10:02.000Z | import logging
from simutator import genome_mutator
def _parse_indels_option_string(s):
distances_and_lengths = []
for x in s.split(","):
dist, length = x.split(":")
distances_and_lengths.append({"dist": int(dist), "len": int(length)})
return distances_and_lengths
def _parse_complex_opt... | 33.852941 | 92 | 0.536056 |
4b60a29cf5f3d75a8c2297b19e9233c0f3975608 | 9,245 | py | Python | asteroids v1.0.py | FlankMe/Asteroids | 902c18457aa15dfaedd548e0df15a68facf3286f | [
"MIT"
] | null | null | null | asteroids v1.0.py | FlankMe/Asteroids | 902c18457aa15dfaedd548e0df15a68facf3286f | [
"MIT"
] | null | null | null | asteroids v1.0.py | FlankMe/Asteroids | 902c18457aa15dfaedd548e0df15a68facf3286f | [
"MIT"
] | 1 | 2021-11-05T12:57:16.000Z | 2021-11-05T12:57:16.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon May 02 20:56:30 2016
Simple game where the player has to dodge the asteroids (grey) and catch the
golden coins (yellow). When playing as a human, hold the mouse button to move
left or leave it to move right.
The idea is to create a simple environment for training a deep (co... | 33.618182 | 80 | 0.636019 |
726ebe4f22159cdbde71433b1a9121126c69d8b0 | 3,560 | py | Python | Back-End/Python/Basics/Part -4- OOP/02 - Polymorphism/06_callable_protocol.py | ASHISHKUMAR2411/Programming-CookBook | 9c60655d64d21985ccb4196360858d98344701f9 | [
"MIT"
] | 25 | 2021-04-28T02:51:26.000Z | 2022-03-24T13:58:04.000Z | Back-End/Python/Basics/Part -4- OOP/02 - Polymorphism/06_callable_protocol.py | ASHISHKUMAR2411/Programming-CookBook | 9c60655d64d21985ccb4196360858d98344701f9 | [
"MIT"
] | 1 | 2022-03-03T23:33:41.000Z | 2022-03-03T23:35:41.000Z | Back-End/Python/Basics/Part -4- OOP/02 - Polymorphism/06_callable_protocol.py | ASHISHKUMAR2411/Programming-CookBook | 9c60655d64d21985ccb4196360858d98344701f9 | [
"MIT"
] | 15 | 2021-05-30T01:35:20.000Z | 2022-03-25T12:38:25.000Z | from functools import partial
from collections import defaultdict
from functools import wraps
def my_func(a, b, c):
return a, b, c
class Partial:
def __init__(self, func, *args):
self._func = func
self._args = args
def __call__(self, *args):
return self._func(*self._args,... | 19.668508 | 95 | 0.614326 |
3910e616bb4985faca26428fcf93c4e573ba8650 | 4,683 | py | Python | py3status/modules/deadbeef.py | eugenenelou/py3status | bbf256af954b9ff0ac794e9ebd441286ccd339e2 | [
"BSD-3-Clause"
] | null | null | null | py3status/modules/deadbeef.py | eugenenelou/py3status | bbf256af954b9ff0ac794e9ebd441286ccd339e2 | [
"BSD-3-Clause"
] | null | null | null | py3status/modules/deadbeef.py | eugenenelou/py3status | bbf256af954b9ff0ac794e9ebd441286ccd339e2 | [
"BSD-3-Clause"
] | null | null | null | """
Display songs currently playing in DeaDBeeF.
Configuration parameters:
cache_timeout: refresh interval for this module (default 5)
format: display format for this module (default '[{artist} - ][{title}]')
sleep_timeout: when deadbeef is not running, this interval will be used
to allow faster re... | 32.520833 | 80 | 0.624173 |
b27e9e62c112c9dd6b33f927b341650287cfdd9f | 2,052 | py | Python | backendaas/api/AAS.py | ali-asad-fzea/_ | cd8df57228e1d867714b11d917d0b1f9cb0a102b | [
"MIT"
] | 1 | 2022-03-08T15:19:46.000Z | 2022-03-08T15:19:46.000Z | backendaas/api/AAS.py | ali-asad-fzea/_ | cd8df57228e1d867714b11d917d0b1f9cb0a102b | [
"MIT"
] | null | null | null | backendaas/api/AAS.py | ali-asad-fzea/_ | cd8df57228e1d867714b11d917d0b1f9cb0a102b | [
"MIT"
] | 4 | 2020-09-29T12:15:47.000Z | 2022-02-08T06:40:55.000Z |
import os
import pandas as pd
import pickle
import json
def getJSON(csvFile, index=0):
df = pd.read_csv(csvFile)
print(df.iloc[index].to_json())
def getDF(d1):
d2 = {}
for k in d1:
v = []
v.append(d1[k])
d2[k]= v
return pd.DataFrame(d2)
def training():
d... | 28.5 | 94 | 0.612573 |
1844dcf4c7bf1555ba73208bc63c1c3ccb4f0441 | 2,015 | py | Python | src/tfi/base/__init__.py | ajbouh/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 160 | 2017-09-13T00:32:05.000Z | 2018-05-21T18:17:32.000Z | src/tfi/base/__init__.py | tesserai/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 6 | 2017-09-14T17:54:21.000Z | 2018-01-27T19:31:18.000Z | src/tfi/base/__init__.py | ajbouh/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 11 | 2017-09-13T00:37:08.000Z | 2018-03-05T08:03:34.000Z | class _GetAttrAccumulator:
@staticmethod
def apply(gaa, target):
if not isinstance(gaa, _GetAttrAccumulator):
if isinstance(gaa, dict):
return {
_GetAttrAccumulator.apply(k, target): _GetAttrAccumulator.apply(v, target)
for k, v in gaa.... | 28.785714 | 94 | 0.519107 |
088339b68187b44ef23b5bd99e0b6d20e219fd43 | 3,162 | py | Python | ae_web/accounts/migrations/0001_initial.py | arrayexpress/ae_auto | 78e50cc31997cb5a69d0d74258b6b1a089ba387a | [
"Apache-2.0"
] | null | null | null | ae_web/accounts/migrations/0001_initial.py | arrayexpress/ae_auto | 78e50cc31997cb5a69d0d74258b6b1a089ba387a | [
"Apache-2.0"
] | 4 | 2020-06-05T19:26:42.000Z | 2022-03-29T21:55:14.000Z | ae_web/accounts/migrations/0001_initial.py | arrayexpress/ae_auto | 78e50cc31997cb5a69d0d74258b6b1a089ba387a | [
"Apache-2.0"
] | 1 | 2019-03-27T13:15:37.000Z | 2019-03-27T13:15:37.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
import django.core.validators
import django.contrib.auth.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_re... | 68.73913 | 432 | 0.665085 |
33f00e4e3af2c0dcdf7270ea4c7f233f2ddcd3cc | 12,850 | py | Python | tests/sentry/api/test_event_search.py | detouched/sentry | 1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/api/test_event_search.py | detouched/sentry | 1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd | [
"BSD-3-Clause"
] | 1 | 2021-05-09T11:43:43.000Z | 2021-05-09T11:43:43.000Z | tests/sentry/api/test_event_search.py | detouched/sentry | 1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import datetime
from django.utils import timezone
from parsimonious.exceptions import IncompleteParseError
from sentry.api.event_search import (
convert_endpoint_params, get_snuba_query_args, parse_search_query,
InvalidSearchQuery, SearchFilter, SearchKey, SearchValue
)... | 34.72973 | 101 | 0.466226 |
d7e279b24d45237786f5447972d84d66ddcc5b5f | 44,885 | py | Python | qteasy/operator.py | shepherdpp/qteasy | eabcbe79da7d196a530b8ef0d3f654c0b1dcf38d | [
"CC0-1.0"
] | 7 | 2020-02-10T22:47:11.000Z | 2022-03-24T06:50:54.000Z | qteasy/operator.py | shepherdpp/qteasy | eabcbe79da7d196a530b8ef0d3f654c0b1dcf38d | [
"CC0-1.0"
] | 8 | 2020-02-11T18:07:21.000Z | 2022-01-10T16:24:16.000Z | qteasy/operator.py | shepherdpp/qteasy | eabcbe79da7d196a530b8ef0d3f654c0b1dcf38d | [
"CC0-1.0"
] | 3 | 2021-05-09T03:16:55.000Z | 2022-02-18T21:52:34.000Z | # coding=utf-8
# operator.py
# ======================================
# This file contains Operator class, that
# merges and applies investment strategies
# to generate operation signals with
# given history data.
# ======================================
import pandas as pd
import numpy as np
from .finance import Cas... | 40.61991 | 121 | 0.593093 |
0124dceccc0f8e331d0ae1df73064d3aa3f21886 | 5,875 | py | Python | sound_classification/evaluate_classification.py | laurent-george/protolab_sound_recognition | c29a138c2b7cd60afc3c8b601d88857454202fc9 | [
"MIT"
] | 27 | 2015-07-09T15:07:39.000Z | 2019-10-03T07:44:32.000Z | sound_classification/evaluate_classification.py | lgeo3/protolab_sound_recognition | c29a138c2b7cd60afc3c8b601d88857454202fc9 | [
"MIT"
] | 7 | 2015-09-03T10:29:23.000Z | 2019-04-16T10:14:09.000Z | sound_classification/evaluate_classification.py | laurent-george/protolab_sound_recognition | c29a138c2b7cd60afc3c8b601d88857454202fc9 | [
"MIT"
] | 9 | 2015-07-09T15:07:17.000Z | 2019-10-10T18:24:56.000Z | __author__ = 'lgeorge'
#import seaborn as sns
import pylab
import classification_service
import numpy as np
import sound_classification.confusion_matrix
from sklearn.metrics import confusion_matrix
def plot_distribution_true_false(prediction_df):
"""
:param prediction_df:
:return:
"""
mask_well_c... | 45.542636 | 207 | 0.697532 |
e5d4483b8ec2f44fe361b9e670bf65f9a7bf71ab | 148 | py | Python | result.py | zeronph/FbMessengerBirthdayBOT | ec51f25ed4067669f58aa4d0ec0ad81e6281195b | [
"MIT"
] | 23 | 2017-10-09T02:20:41.000Z | 2022-02-13T13:27:10.000Z | result.py | phnhan0301/FbMessengerBirthdayBOT | ec51f25ed4067669f58aa4d0ec0ad81e6281195b | [
"MIT"
] | null | null | null | result.py | phnhan0301/FbMessengerBirthdayBOT | ec51f25ed4067669f58aa4d0ec0ad81e6281195b | [
"MIT"
] | 17 | 2017-10-08T10:59:39.000Z | 2022-03-11T20:22:47.000Z | friendlist = {'100005035713252':'Shãy Môūta','100014534922785':'Siwar Arfaoui','100013961718416':'Rahma Farhat','100003139845002':'Nesrine Zouaoui'} | 148 | 148 | 0.783784 |
490e5bf42c515a1de50b512479367a7a47c69eda | 1,309 | py | Python | gfootball/scenarios/academy_3_vs_1_with_keeper.py | mahi97/football | 18d51cb110034ce7080b2ccce14a2539d2a04af3 | [
"Apache-2.0"
] | 3 | 2019-06-20T05:47:02.000Z | 2019-08-25T05:04:11.000Z | gfootball/scenarios/academy_3_vs_1_with_keeper.py | AzharMithani/football | 0f09bcb8b3d48ac31987e13739e21a58ef0ca405 | [
"Apache-2.0"
] | 1 | 2019-06-09T10:06:36.000Z | 2019-06-09T10:06:36.000Z | gfootball/scenarios/academy_3_vs_1_with_keeper.py | nczempin/gfootball | 617e9cb6d48b4ac7187b9b3de68bd4ab44ea528e | [
"Apache-2.0"
] | 1 | 2019-06-09T12:42:28.000Z | 2019-06-09T12:42:28.000Z | # coding=utf-8
# Copyright 2019 Google LLC
# 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 ... | 31.926829 | 74 | 0.755539 |
6b42582ed4cbbba6e713d06083ad7be0c91ae0c5 | 1,541 | py | Python | git_hooks.py | joshi-bharat/linter | d0d26d46708b5adcbb384185014eb6524ad1e4ce | [
"BSD-3-Clause"
] | 25 | 2017-08-09T16:48:54.000Z | 2022-03-15T12:48:31.000Z | git_hooks.py | joshi-bharat/linter | d0d26d46708b5adcbb384185014eb6524ad1e4ce | [
"BSD-3-Clause"
] | 19 | 2017-08-15T15:39:40.000Z | 2021-11-11T10:46:23.000Z | git_hooks.py | mit-drl/linter | 25381bb35b9435e3d906a881130ad95ebdcba2cb | [
"BSD-3-Clause"
] | 11 | 2017-11-06T09:02:13.000Z | 2021-11-03T02:41:23.000Z | #!/usr/bin/env python
from __future__ import print_function
import os
import subprocess
import sys
def run_command_in_folder(command, folder):
"""Run a bash command in a specific folder."""
run_command = subprocess.Popen(command,
shell=True,
... | 27.517857 | 79 | 0.635951 |
46c827dd90700fc195c16699aae7dc21de763094 | 7,369 | py | Python | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/maya/callbacks/event_callback_handler.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/maya/callbacks/event_callback_handler.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/maya/callbacks/event_callback_handler.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | # coding:utf-8
#!/usr/bin/python
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
# ------------------------------------------------------------------------... | 33.495455 | 99 | 0.524495 |
a071e556fb0af977f5256f588d1c1310cbca7233 | 5,075 | py | Python | recoloradv/mister_ed/cifar10/cifar_resnets.py | YogaLYJ/ReColorAdv | b49aa59049e73f7ad02de1bef1add52e65b6f160 | [
"MIT"
] | 40 | 2019-01-17T22:17:42.000Z | 2022-03-23T06:24:00.000Z | mister_ed/cifar10/cifar_resnets.py | Mortal12138/geometric-certificates | 8730abaf2ab0c8972a2d40168d5fe64c8670fc62 | [
"MIT"
] | 6 | 2019-08-03T08:49:21.000Z | 2022-03-11T23:43:56.000Z | mister_ed/cifar10/cifar_resnets.py | Mortal12138/geometric-certificates | 8730abaf2ab0c8972a2d40168d5fe64c8670fc62 | [
"MIT"
] | 7 | 2019-12-14T07:19:51.000Z | 2021-05-23T15:01:29.000Z | '''
MISTER_ED_NOTE: I blatantly copied this code from this github repository:
https://github.com/akamaster/pytorch_resnet_cifar10
Huge kudos to Yerlan Idelbayev.
'''
'''
Properly implemented ResNet-s for CIFAR10 as described in paper [1].
The implementation and structure of this file is hugely influenced by [2]
wh... | 30.945122 | 120 | 0.633498 |
d0cbbfb408ee3de97a3dcb47a1c4a27f82fa36d9 | 20,217 | py | Python | training/random_codes/MCD_codes/Train_MCD_mixstyle_multisrc.py | manogna-s/da-fer | 43229ba368454cb4e5aecab8fdb3ea68ad9060e4 | [
"MIT"
] | null | null | null | training/random_codes/MCD_codes/Train_MCD_mixstyle_multisrc.py | manogna-s/da-fer | 43229ba368454cb4e5aecab8fdb3ea68ad9060e4 | [
"MIT"
] | null | null | null | training/random_codes/MCD_codes/Train_MCD_mixstyle_multisrc.py | manogna-s/da-fer | 43229ba368454cb4e5aecab8fdb3ea68ad9060e4 | [
"MIT"
] | null | null | null | import torch.nn.functional as F
from torch.autograd import Variable
from models.ResNet_feat import ResClassifier
from train_setup import *
from utils.Loss import *
from models.mixstyle import activate_mixstyle, deactivate_mixstyle
import copy
eta = 1.0
num_k = 2 #4
def Train_MCD(args, G, F1, F2, train_source1_datal... | 44.141921 | 151 | 0.621853 |
2cdc08ce6f76053d409e81c4827b8cc3bb0ed9c9 | 520 | py | Python | mlic/__init__.py | learnmedicalcantsavecn/Machine_Learning | 537998bb47801d88c9a91432ffc71df1b6b89ae5 | [
"Apache-2.0"
] | 1 | 2019-12-11T14:13:37.000Z | 2019-12-11T14:13:37.000Z | mlic/__init__.py | learnmedicalcantsavecn/Machine_Learning | 537998bb47801d88c9a91432ffc71df1b6b89ae5 | [
"Apache-2.0"
] | null | null | null | mlic/__init__.py | learnmedicalcantsavecn/Machine_Learning | 537998bb47801d88c9a91432ffc71df1b6b89ae5 | [
"Apache-2.0"
] | 1 | 2020-11-19T14:05:53.000Z | 2020-11-19T14:05:53.000Z | # -*- coding: utf-8 -*-
"""
Description : Machine Learning in Action
Author : xxm
"""
import sys
import os
# import loguru
path = {
'BASE_PATH': os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
'EXAMPLE_PATH': os.path.abspath(os.path.dirname(os.path.dirname(__file__))).__add__('/exam... | 23.636364 | 115 | 0.632692 |
64bc6dba2fee2a272b90915098ee7dcc9f891829 | 1,097 | py | Python | crop_rotator/rotator/migrations/0027_auto_20210607_1251.py | Bahusson/crop_rotator | c1d86d36ce1867a84b927708f92c62c7815250a4 | [
"MIT"
] | 1 | 2021-05-08T07:04:45.000Z | 2021-05-08T07:04:45.000Z | crop_rotator/rotator/migrations/0027_auto_20210607_1251.py | Bahusson/crop_rotator | c1d86d36ce1867a84b927708f92c62c7815250a4 | [
"MIT"
] | 80 | 2020-11-18T20:35:12.000Z | 2021-06-13T08:08:36.000Z | crop_rotator/rotator/migrations/0027_auto_20210607_1251.py | Bahusson/crop_rotator | c1d86d36ce1867a84b927708f92c62c7815250a4 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-06-07 10:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('rotator', '0026_auto_20210606_1500'),
]
operations = [
migrations.RemoveField(
model_name='crop',
name='is_deep_roots',
... | 23.847826 | 47 | 0.52051 |
a631b8d408fe226e37ae762011b5a44a09c2989c | 3,090 | py | Python | tests/test_vader.py | merrickchoo/vaderSentiment | 1c942054a15ce941b6989c5b7246ec6f314c344a | [
"MIT"
] | 1 | 2021-08-25T11:34:34.000Z | 2021-08-25T11:34:34.000Z | tests/test_vader.py | merrickchoo/vaderSentiment | 1c942054a15ce941b6989c5b7246ec6f314c344a | [
"MIT"
] | 7 | 2021-08-25T11:09:22.000Z | 2021-09-07T13:35:08.000Z | tests/test_vader.py | merrickchoo/vaderSentiment | 1c942054a15ce941b6989c5b7246ec6f314c344a | [
"MIT"
] | null | null | null | # coding: utf-8
import vaderSentiment
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
from collections import defaultdict as dd
sent = dd(list)
### values for the original vader model
sent['en_vader'] = [["VADER is smart, handsome, and funny.",
(0.0, 0.254, 0.746, 0.8316)],
... | 38.625 | 88 | 0.470227 |
060d21c1364bf4d52143ec573cdaae2133a374aa | 5,576 | py | Python | framework/net_device.py | spdk/tests | 471bb8be275a2b18933bfdb19da109973e09cf05 | [
"BSD-3-Clause"
] | 3 | 2020-04-30T10:47:35.000Z | 2022-01-03T08:18:21.000Z | framework/net_device.py | spdk/tests | 471bb8be275a2b18933bfdb19da109973e09cf05 | [
"BSD-3-Clause"
] | null | null | null | framework/net_device.py | spdk/tests | 471bb8be275a2b18933bfdb19da109973e09cf05 | [
"BSD-3-Clause"
] | 7 | 2017-10-12T08:15:37.000Z | 2021-09-07T06:56:04.000Z | # BSD LICENSE
#
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copy... | 34.419753 | 79 | 0.647956 |
dc750561fb9c7c5c339b044f77715c9ef9eee63f | 8,119 | py | Python | test/unit/test_memcache.py | juhhov/pyOCD | 0965f7f038622ef1d933af5c6916c482a28244ff | [
"Apache-2.0"
] | 1 | 2020-07-11T09:24:25.000Z | 2020-07-11T09:24:25.000Z | test/unit/test_memcache.py | ARMmbed/pyOCD-Samsung | 03242b6eb57d2170a4b531d00f1a0577e2b0abde | [
"Apache-2.0"
] | null | null | null | test/unit/test_memcache.py | ARMmbed/pyOCD-Samsung | 03242b6eb57d2170a4b531d00f1a0577e2b0abde | [
"Apache-2.0"
] | null | null | null | # pyOCD debugger
# Copyright (c) 2016 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ... | 43.650538 | 88 | 0.665846 |
de701fa9beb3cc0de149f9eae070d5fdc9fb189f | 1,323 | py | Python | examples/pyplot/histo_polar.py | mikami520/vedo | 1a3abcf3f1e495287e8934d9b5bb07b511ab8be5 | [
"MIT"
] | 1 | 2022-03-22T21:49:29.000Z | 2022-03-22T21:49:29.000Z | examples/pyplot/histo_polar.py | mikami520/vedo | 1a3abcf3f1e495287e8934d9b5bb07b511ab8be5 | [
"MIT"
] | null | null | null | examples/pyplot/histo_polar.py | mikami520/vedo | 1a3abcf3f1e495287e8934d9b5bb07b511ab8be5 | [
"MIT"
] | null | null | null | from vedo import Hyperboloid, show
from vedo.pyplot import histogram
import numpy as np
np.random.seed(1)
##################################################################
radhisto = histogram(
np.random.rand(200)*6.28,
mode='polar',
title="random orientations",
bins=10,
c=range(10), #'orange'... | 29.4 | 66 | 0.565382 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.