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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18a1a66ddfc12bbc493302b88cd1fbc01b59d040 | 71 | py | Python | Chapter 01/Chap01_Example1.40.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.40.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.40.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | #backslash and new line ignored
print("one\
two\
three")
| 14.2 | 31 | 0.591549 |
56d28223e306c8d52ba40389bbaf2612f9703e16 | 478 | bzl | Python | benchmarks/defs.bzl | Simon-Zh-0409/gvisor | c619cc59c2e826ef1168259287023de198e3e2aa | [
"Apache-2.0"
] | 2 | 2021-02-23T03:14:54.000Z | 2021-04-16T08:46:24.000Z | benchmarks/defs.bzl | Simon-Zh-0409/gvisor | c619cc59c2e826ef1168259287023de198e3e2aa | [
"Apache-2.0"
] | 54 | 2020-07-28T18:10:55.000Z | 2021-03-31T01:17:53.000Z | benchmarks/defs.bzl | LevyForchh/gvisor | a1d7986df9eeff036c3a03a06725d0ad2b2c96c8 | [
"Apache-2.0"
] | 3 | 2021-02-08T17:44:27.000Z | 2022-01-14T16:48:26.000Z | """Provides attributes common to many workload tests."""
load("//tools:defs.bzl", "py_requirement")
test_deps = [
py_requirement("attrs", direct = False),
py_requirement("atomicwrites", direct = False),
py_requirement("more-itertools", direct = False),
py_requirement("pathlib2", direct = False),
p... | 31.866667 | 56 | 0.682008 |
7d9a2fed7205e807ec7f654815c045f3ddcab24d | 25,379 | py | Python | tests/tensorflow_tests/test_tf_CNN.py | piyush-Dubey/nn_builder | e2972bf84c18b9287787633d4c8a1d488b6a26b8 | [
"MIT"
] | 156 | 2019-04-04T17:32:14.000Z | 2022-03-19T08:49:43.000Z | tests/tensorflow_tests/test_tf_CNN.py | piyush-Dubey/nn_builder | e2972bf84c18b9287787633d4c8a1d488b6a26b8 | [
"MIT"
] | 11 | 2019-04-04T17:29:32.000Z | 2022-02-10T00:21:14.000Z | tests/tensorflow_tests/test_tf_CNN.py | piyush-Dubey/nn_builder | e2972bf84c18b9287787633d4c8a1d488b6a26b8 | [
"MIT"
] | 26 | 2019-05-15T19:05:21.000Z | 2022-03-01T22:39:30.000Z | # Run from home directory with python -m pytest tests
import shutil
import pytest
import random
import numpy as np
import tensorflow as tf
import torch.nn as nn
from nn_builder.tensorflow.CNN import CNN
from tensorflow.keras.layers import Dense, Flatten, Conv2D, Concatenate, BatchNormalization, MaxPool2D, AveragePoolin... | 49.762745 | 183 | 0.589464 |
80c383103de10eac82300dd66563a26c87c03514 | 2,146 | py | Python | qiskit_nature/mappers/second_quantization/__init__.py | fs1132429/qiskit-nature | bf58611b29e83857b61783229030bbff72038e36 | [
"Apache-2.0"
] | null | null | null | qiskit_nature/mappers/second_quantization/__init__.py | fs1132429/qiskit-nature | bf58611b29e83857b61783229030bbff72038e36 | [
"Apache-2.0"
] | null | null | null | qiskit_nature/mappers/second_quantization/__init__.py | fs1132429/qiskit-nature | bf58611b29e83857b61783229030bbff72038e36 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021, 2022.
#
# 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 modifications or derivat... | 23.844444 | 98 | 0.717148 |
eb0c00e69d71ce8ce28d1bc3af62cbc8bc5758b1 | 441 | py | Python | abc/abc213/abc213c.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | 1 | 2019-08-21T00:49:34.000Z | 2019-08-21T00:49:34.000Z | abc/abc213/abc213c.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | abc/abc213/abc213c.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | from sys import stdin
readline = stdin.readline
H, W, N = map(int, readline().split())
a = set()
b = set()
c = []
for i in range(N):
A, B = map(int, readline().split())
a.add(A)
b.add(B)
c.append((A, B))
aa = {}
for i, v in enumerate(sorted(a)):
aa[v] = i + 1
bb = {}
for i, v in enumerate(sorted... | 16.333333 | 43 | 0.52381 |
26271a730f0fb009ba80df18248be2097bdc05e4 | 2,716 | py | Python | Main.py | ZeusHay/ImagesColector-EmailSender | de6117ca010f5fba8af5539d4e62edbb03771f3d | [
"MIT"
] | null | null | null | Main.py | ZeusHay/ImagesColector-EmailSender | de6117ca010f5fba8af5539d4e62edbb03771f3d | [
"MIT"
] | null | null | null | Main.py | ZeusHay/ImagesColector-EmailSender | de6117ca010f5fba8af5539d4e62edbb03771f3d | [
"MIT"
] | null | null | null | import smtplib, email.message
from typing import cast
from selenium import webdriver
from config import *
def getPageImages(imagesCount: 3):
driver = webdriver.Chrome()
driver.set_window_size(1920, 1080)
driver.get("https://lojahaven.com.br/")
driver.find_element_by_xpath('//*[@id="menu-item-6232"]/a')... | 31.581395 | 135 | 0.617452 |
afa511c78f9bfb930b1631dcbe07f91b2f9e1384 | 99 | py | Python | src/config.py | rtlee9/MNIST-bounding-box | 703d3e655def1a3dbe45197fc29aa96a1f1c74d8 | [
"MIT"
] | 1 | 2021-10-01T10:03:26.000Z | 2021-10-01T10:03:26.000Z | src/config.py | rtlee9/MNIST-bounding-box | 703d3e655def1a3dbe45197fc29aa96a1f1c74d8 | [
"MIT"
] | null | null | null | src/config.py | rtlee9/MNIST-bounding-box | 703d3e655def1a3dbe45197fc29aa96a1f1c74d8 | [
"MIT"
] | 3 | 2018-05-09T04:27:24.000Z | 2020-12-27T17:01:55.000Z | from os import path
path_main = path.abspath('..')
path_outputs = path.join(path_main, 'outputs')
| 19.8 | 46 | 0.727273 |
f9b31b3b0ebe9ba8096ea93f498cc1b754022e90 | 183 | py | Python | ChatServers/PC/ReadPng.py | RogueAndy/RgPython | 71d93aea10ad4a0a49bfd896e68a8d1e11aaea63 | [
"MIT"
] | null | null | null | ChatServers/PC/ReadPng.py | RogueAndy/RgPython | 71d93aea10ad4a0a49bfd896e68a8d1e11aaea63 | [
"MIT"
] | null | null | null | ChatServers/PC/ReadPng.py | RogueAndy/RgPython | 71d93aea10ad4a0a49bfd896e68a8d1e11aaea63 | [
"MIT"
] | null | null | null | from PIL import Image
import pytesseract
image = Image.open('/Users/rogueandy/Desktop/cucu.jpg')
print('~~~~~~~ ')
stringImage = pytesseract.image_to_string(image)
print(stringImage) | 26.142857 | 55 | 0.765027 |
e08d8359b27c8e5f51fa88774e8966a238f30d5c | 2,211 | py | Python | wellspring2xlsx.py | markbasham/Wellspring2xlsx | be13c39aecdf8cef6b1223d9a4cf67185d449706 | [
"Apache-2.0"
] | null | null | null | wellspring2xlsx.py | markbasham/Wellspring2xlsx | be13c39aecdf8cef6b1223d9a4cf67185d449706 | [
"Apache-2.0"
] | 1 | 2021-06-24T11:25:44.000Z | 2021-06-25T12:09:29.000Z | wellspring2xlsx.py | rosalindfranklininstitute/Wellspring2xlsx | 6b0faeaacf12387f4b9df2af15e470ff71a57410 | [
"Apache-2.0"
] | 1 | 2021-06-24T09:02:46.000Z | 2021-06-24T09:02:46.000Z | import pandas as pd
from datetime import datetime, date
def ws2xlsx(input_file, output_file):
# Create a Pandas dataframe from some datetime data.
df = pd.read_csv(input_file)
# Create a Pandas Excel writer using XlsxWriter as the engine.
# Also set the default datetime and date formats.
writer = ... | 34.546875 | 112 | 0.58616 |
37c637fcd5e4c746a779c1821d5f84afc9945039 | 441 | py | Python | matlab_interfaces/matlab_data_collect.py | tuncali/VeTeF | 3810cffd87fc6a9d815774cb3d914d3a47288055 | [
"Apache-2.0"
] | null | null | null | matlab_interfaces/matlab_data_collect.py | tuncali/VeTeF | 3810cffd87fc6a9d815774cb3d914d3a47288055 | [
"Apache-2.0"
] | null | null | null | matlab_interfaces/matlab_data_collect.py | tuncali/VeTeF | 3810cffd87fc6a9d815774cb3d914d3a47288055 | [
"Apache-2.0"
] | null | null | null | import sys
import os
filePath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(filePath+"/../controllers/webots_vehicle_testing")
sys.path.append(filePath+"/../controllers/controller_commons")
sys.path.append("./SimExamples")
from single_car_acc_follow import *
def collect_data(acc_target_list, ... | 36.75 | 96 | 0.804989 |
251ad045e343f5f5380612649b89e26451800cf5 | 1,667 | py | Python | example_webapp.py | EricPobot/picoweb | 8569f04a72a7b363b3543ef1b15c18eea7b8a6f3 | [
"MIT"
] | null | null | null | example_webapp.py | EricPobot/picoweb | 8569f04a72a7b363b3543ef1b15c18eea7b8a6f3 | [
"MIT"
] | null | null | null | example_webapp.py | EricPobot/picoweb | 8569f04a72a7b363b3543ef1b15c18eea7b8a6f3 | [
"MIT"
] | null | null | null | #
# This is a picoweb example showing a centralized web page route
# specification (classical Django style).
#
import ure as re
import picoweb
def index(req, resp):
# You can construct an HTTP response completely yourself, having
# a full control of headers sent...
yield from resp.awrite("HTTP/1.0 200 OK\... | 30.87037 | 91 | 0.690462 |
8ca8c44c05c86c13e018d4d7a4072d7cc0fb2b83 | 8,300 | py | Python | arcreactor/jupyter.py | t-sahin/arc-reactor | 20b16e3cde386dad06617b4b5ff3b2e532788781 | [
"BSD-3-Clause"
] | null | null | null | arcreactor/jupyter.py | t-sahin/arc-reactor | 20b16e3cde386dad06617b4b5ff3b2e532788781 | [
"BSD-3-Clause"
] | null | null | null | arcreactor/jupyter.py | t-sahin/arc-reactor | 20b16e3cde386dad06617b4b5ff3b2e532788781 | [
"BSD-3-Clause"
] | null | null | null | from .protobufs.graph_pb2 import Graph
from .protobufs.kinetics_pb2 import SystemKinetics as Kinetics
import copy, asyncio, functools
from . import simulation
import matplotlib as mpl
import matplotlib.pyplot as plt
import networkx as nx
from moviepy.editor import VideoClip
from moviepy.video.io.bindings import mplfig_... | 35.622318 | 133 | 0.570482 |
8c83c8495e98e4002dcea0c4e867711bbfafe9e1 | 6,426 | py | Python | Datenauswertung/make_graphs.py | strammermax27/P-Seminar_Stratosphaerenballon | 11d8429c1a2bf2954027573ba59f7d81c7369581 | [
"MIT"
] | null | null | null | Datenauswertung/make_graphs.py | strammermax27/P-Seminar_Stratosphaerenballon | 11d8429c1a2bf2954027573ba59f7d81c7369581 | [
"MIT"
] | null | null | null | Datenauswertung/make_graphs.py | strammermax27/P-Seminar_Stratosphaerenballon | 11d8429c1a2bf2954027573ba59f7d81c7369581 | [
"MIT"
] | null | null | null | from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.slider import Slider
from kivy.properties import ObjectProperty
from kivy.garden.graph import Graph, SmoothLinePlot, MeshLinePlot
from kivy.clock import Clock
from math import sin, cos
import os
import... | 19.413897 | 103 | 0.669935 |
ea422de8d32acf48381c8b8b740846e1ca93caf1 | 8,180 | py | Python | iss_forecasting/analysis/tech_category_level/research_funding_and_investment_generated_data.py | nestauk/iss_forecasting | 15e7f6dffb4c8ea1cc32203f3dec37b2d59c8ce9 | [
"MIT"
] | 1 | 2022-01-18T18:34:06.000Z | 2022-01-18T18:34:06.000Z | iss_forecasting/analysis/tech_category_level/research_funding_and_investment_generated_data.py | nestauk/iss_forecasting | 15e7f6dffb4c8ea1cc32203f3dec37b2d59c8ce9 | [
"MIT"
] | 12 | 2022-01-13T16:06:50.000Z | 2022-02-14T18:39:00.000Z | iss_forecasting/analysis/tech_category_level/research_funding_and_investment_generated_data.py | nestauk/iss_forecasting | 15e7f6dffb4c8ea1cc32203f3dec37b2d59c8ce9 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# cell_metadata_filter: -all
# comment_magics: true
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.6
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# n... | 41.734694 | 258 | 0.775917 |
9e97a41435c577b0bd30cac2e75d26e05d64472a | 6,909 | py | Python | telethon/_client/messageparse.py | jamestiotio/Telethon | 4db4d9ace5eb5e7c2174e410eb492fa4e18c215f | [
"MIT"
] | 1 | 2022-01-30T11:42:18.000Z | 2022-01-30T11:42:18.000Z | telethon/_client/messageparse.py | jamestiotio/Telethon | 4db4d9ace5eb5e7c2174e410eb492fa4e18c215f | [
"MIT"
] | null | null | null | telethon/_client/messageparse.py | jamestiotio/Telethon | 4db4d9ace5eb5e7c2174e410eb492fa4e18c215f | [
"MIT"
] | null | null | null | import itertools
import re
import typing
from .._misc import helpers, utils
from ..types import _custom
from ..types._custom.inputmessage import InputMessage
from .. import _tl
if typing.TYPE_CHECKING:
from .telegramclient import TelegramClient
async def _replace_with_mention(self: 'TelegramClient', entities, i... | 39.255682 | 111 | 0.619771 |
8f38cbc733c0c5fe3edfb6eb81ca1d88a641621e | 2,650 | py | Python | mosqito/functions/loudness_zwicker/loudness_zwicker_time.py | djcaminero/MoSQITo-FDP | f6b966523156731bd82cfeb9b1d38aeb69e89106 | [
"Apache-2.0"
] | 74 | 2020-04-22T08:56:29.000Z | 2022-03-28T17:02:12.000Z | mosqito/functions/loudness_zwicker/loudness_zwicker_time.py | djcaminero/MoSQITo-FDP | f6b966523156731bd82cfeb9b1d38aeb69e89106 | [
"Apache-2.0"
] | 36 | 2020-08-24T08:12:38.000Z | 2022-03-29T15:52:01.000Z | mosqito/functions/loudness_zwicker/loudness_zwicker_time.py | djcaminero/MoSQITo-FDP | f6b966523156731bd82cfeb9b1d38aeb69e89106 | [
"Apache-2.0"
] | 26 | 2020-04-24T12:44:40.000Z | 2022-03-19T06:21:37.000Z | # -*- coding: utf-8 -*-
"""
@date Created on Thu Mar 26 2020
@author martin_g for Eomys
"""
# Standard library imports
import numpy as np
# Local applications imports
from mosqito.functions.loudness_zwicker.loudness_zwicker_shared import (
calc_main_loudness,
)
from mosqito.functions.loudness_zwicker.loudness_zwi... | 32.716049 | 87 | 0.711698 |
f16bd7a9a5c58bd9bc489457e9d119002ed9dc54 | 3,942 | py | Python | examples_source/2D_simulation(crystalline)/plot_3_SAS_Rb2CrO4.py | pjgrandinetti/mrsimulator | e603395e52ad162d4a9051a0741651c9030c3459 | [
"BSD-3-Clause"
] | 14 | 2019-05-28T20:06:13.000Z | 2021-05-27T01:37:16.000Z | examples_source/2D_simulation(crystalline)/plot_3_SAS_Rb2CrO4.py | wushanyun64/mrsimulator | 01b447239d9f469df62b7293a74a3d0c34500a19 | [
"BSD-3-Clause"
] | 74 | 2021-06-07T15:13:49.000Z | 2022-03-29T20:09:19.000Z | examples_source/2D_simulation(crystalline)/plot_3_SAS_Rb2CrO4.py | wushanyun64/mrsimulator | 01b447239d9f469df62b7293a74a3d0c34500a19 | [
"BSD-3-Clause"
] | 7 | 2019-05-28T20:19:29.000Z | 2021-04-06T18:48:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Rb₂CrO₄, ⁸⁷Rb (I=3/2) SAS
^^^^^^^^^^^^^^^^^^^^^^^^^
⁸⁷Rb (I=3/2) Switched-angle spinning (SAS) simulation.
"""
# %%
# The following is a Switched-Angle Spinning (SAS) simulation of
# :math:`\text{Rb}_2\text{CrO}_4`. While :math:`\text{Rb}_2\text{CrO}_4` has two
# rubid... | 31.03937 | 88 | 0.611365 |
5e2fffaf1b7d1a6f1ef0efcc6a89b44a6f33d4e7 | 127,713 | py | Python | tensorflow/python/ops/variables.py | carchrae/tensorflow | 6a69a6b2e286b14ac9ae813998bb0d78b6fee440 | [
"Apache-2.0"
] | 12 | 2020-12-28T18:42:10.000Z | 2022-03-24T17:34:21.000Z | tensorflow/python/ops/variables.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 2 | 2021-08-25T15:58:11.000Z | 2022-02-10T01:47:24.000Z | tensorflow/python/ops/variables.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 3 | 2020-03-09T19:17:02.000Z | 2020-06-26T23:14:31.000Z | # Copyright 2015 The TensorFlow 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 applica... | 37.874555 | 114 | 0.686242 |
99e06e2d34b27882eaf1b97dc355932610151ed0 | 8,256 | py | Python | bindings/python/cntk/contrib/crosstalkcaffe/tests/op2cntk_test.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 17,702 | 2016-01-25T14:03:01.000Z | 2019-05-06T09:23:41.000Z | bindings/python/cntk/contrib/crosstalkcaffe/tests/op2cntk_test.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 3,489 | 2016-01-25T13:32:09.000Z | 2019-05-03T11:29:15.000Z | bindings/python/cntk/contrib/crosstalkcaffe/tests/op2cntk_test.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 5,180 | 2016-01-25T14:02:12.000Z | 2019-05-06T04:24:28.000Z | # ==============================================================================
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
imp... | 32.503937 | 104 | 0.537185 |
019c6e536300218da0df5c2f6a9820c63a62654d | 1,002 | py | Python | repos/system_upgrade/el7toel8/actors/ziplcheckbootentries/actor.py | tmds/leapp-repository | 7c9ea115a68530eb25f5c23d3fcadd60c501bf78 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/ziplcheckbootentries/actor.py | tmds/leapp-repository | 7c9ea115a68530eb25f5c23d3fcadd60c501bf78 | [
"Apache-2.0"
] | 1 | 2022-03-07T15:34:11.000Z | 2022-03-07T15:35:15.000Z | repos/system_upgrade/el7toel8/actors/ziplcheckbootentries/actor.py | tmds/leapp-repository | 7c9ea115a68530eb25f5c23d3fcadd60c501bf78 | [
"Apache-2.0"
] | null | null | null | from leapp.actors import Actor
from leapp.libraries.actor.ziplcheckbootentries import inhibit_if_invalid_zipl_configuration
from leapp.models import SourceBootLoaderConfiguration
from leapp.reporting import Report
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
class ZiplCheckBootEntries(Actor):
"""
Inh... | 40.08 | 106 | 0.795409 |
68f53acfc6604771b0594adbb174d263224d9478 | 19,060 | py | Python | model_zoo/official/nlp/gnmt_v2/src/gnmt_model/beam_search.py | kungfu-team/mindspore-bert | 71501cf52ae01db9d6a73fb64bcfe68a6509dc32 | [
"Apache-2.0"
] | 2 | 2021-07-08T13:10:42.000Z | 2021-11-08T02:48:57.000Z | model_zoo/official/nlp/gnmt_v2/src/gnmt_model/beam_search.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | model_zoo/official/nlp/gnmt_v2/src/gnmt_model/beam_search.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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.318182 | 117 | 0.621301 |
7a2d0cc3d25dd74c3c2514dad1b9471c7560afa7 | 1,847 | py | Python | base/api/serializers.py | Ajay2810-hub/EbooksPortal | 70f3ffe803a1da879a17449c6a7b7fb208b0ca58 | [
"MIT"
] | null | null | null | base/api/serializers.py | Ajay2810-hub/EbooksPortal | 70f3ffe803a1da879a17449c6a7b7fb208b0ca58 | [
"MIT"
] | null | null | null | base/api/serializers.py | Ajay2810-hub/EbooksPortal | 70f3ffe803a1da879a17449c6a7b7fb208b0ca58 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User, auth
from rest_framework.serializers import ModelSerializer
from rest_framework import serializers
from base.models import *
from books.api.serializers import BooksSerializer
from papers.api.serializers import PapersSerializer
class UsersSerializer(ModelSerializer):
c... | 34.203704 | 91 | 0.640498 |
688a638125061aa2a99c9a24beeb829c6ea8ca9d | 3,954 | py | Python | python/jittor/test/test_asm_tuner.py | llehtahw/jittor | d83389117fd026a0881dd713e658ce5ae2a75bcb | [
"Apache-2.0"
] | 5 | 2020-08-09T02:27:58.000Z | 2021-01-13T16:04:32.000Z | python/jittor/test/test_asm_tuner.py | llehtahw/jittor | d83389117fd026a0881dd713e658ce5ae2a75bcb | [
"Apache-2.0"
] | null | null | null | python/jittor/test/test_asm_tuner.py | llehtahw/jittor | d83389117fd026a0881dd713e658ce5ae2a75bcb | [
"Apache-2.0"
] | 1 | 2020-06-23T16:25:42.000Z | 2020-06-23T16:25:42.000Z | # ***************************************************************
# Copyright (c) 2020 Jittor. Authors:
# Guowei Yang <471184555@qq.com>
# Dun Liang <randonlang@gmail.com>.
# All Rights Reserved.
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source c... | 35.621622 | 187 | 0.611786 |
bdddc03ed1e104bee1f041eca803625aac6add99 | 162,575 | py | Python | pandas/core/generic.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2016-07-14T20:35:55.000Z | 2016-07-14T20:35:55.000Z | pandas/core/generic.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/generic.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # pylint: disable=W0231,E1101
import warnings
import operator
import weakref
import gc
import numpy as np
import pandas.lib as lib
import pandas as pd
from pandas.core.base import PandasObject
from pandas.core.index import (Index, MultiIndex, _ensure_index,
InvalidIndexError)
import pand... | 36.558354 | 120 | 0.544247 |
377f369bdf1d503bfb993bedf4a04ce8b6d08efa | 238 | py | Python | FreeCodeCamp/Inheritance/Chef.py | NikiReis/Python_OOP | 8071d641f4895b28584317c0896834c354107df2 | [
"MIT"
] | null | null | null | FreeCodeCamp/Inheritance/Chef.py | NikiReis/Python_OOP | 8071d641f4895b28584317c0896834c354107df2 | [
"MIT"
] | null | null | null | FreeCodeCamp/Inheritance/Chef.py | NikiReis/Python_OOP | 8071d641f4895b28584317c0896834c354107df2 | [
"MIT"
] | null | null | null | class Chef:
def make_chicken(self):
print("The chef make a chicken")
def make_salad(self):
print("The chef makes salad")
def make_special_dish(self):
print("The chef makes a special dish") | 26.444444 | 46 | 0.605042 |
37d3bca340fdf7dc466ad45329dd2fb0a4c8736e | 724 | py | Python | sphinxquant/sphinxquant/celery.py | emaiqi/sphinx-quant | e6cf07aaeb4738463f901ddafa0f2fcd9da1ee60 | [
"MIT"
] | null | null | null | sphinxquant/sphinxquant/celery.py | emaiqi/sphinx-quant | e6cf07aaeb4738463f901ddafa0f2fcd9da1ee60 | [
"MIT"
] | null | null | null | sphinxquant/sphinxquant/celery.py | emaiqi/sphinx-quant | e6cf07aaeb4738463f901ddafa0f2fcd9da1ee60 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sphinxquant.settings')
app = Celery('sphinxquant')
# Using a string here means the worker doesn't have to se... | 32.909091 | 71 | 0.780387 |
4d4c39fbff02f82d476cd41c83b94e1d3b2b817d | 7,929 | py | Python | backend/template_sprint10_d_23683/settings.py | crowdbotics-dev/template-sprint10-d-23683 | bc192716091ed9fb49867bb41e5301b9d71b1805 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/template_sprint10_d_23683/settings.py | crowdbotics-dev/template-sprint10-d-23683 | bc192716091ed9fb49867bb41e5301b9d71b1805 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/template_sprint10_d_23683/settings.py | crowdbotics-dev/template-sprint10-d-23683 | bc192716091ed9fb49867bb41e5301b9d71b1805 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for template_sprint10_d_23683 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/... | 30.496154 | 112 | 0.737798 |
5e69585aee915df797bf8951bd1a971eea3bca90 | 6,093 | py | Python | openGaussBase/testcase/LOCK_LEVEL/Opengauss_Function_Lower_Lock_Level_Case0049.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/LOCK_LEVEL/Opengauss_Function_Lower_Lock_Level_Case0049.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/LOCK_LEVEL/Opengauss_Function_Lower_Lock_Level_Case0049.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 39.823529 | 84 | 0.586739 |
57c3679bc48d8c27e8449954a40068f292fce54c | 2,104 | py | Python | examples/SMRF_dewPoint.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | examples/SMRF_dewPoint.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | examples/SMRF_dewPoint.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | '''
20170330 Scott Havens
Distribute the gridded forcing data to the DEM
'''
import sys
from datetime import datetime
import smrf
def main():
try:
start = datetime.now()
configFile = '../test_data/testConfig.ini'
if len(sys.argv) > 1:
configFile = sys.argv[1]
wi... | 29.633803 | 111 | 0.528042 |
323d25bd6ea3c1012a84e63859a73362b61d8cc1 | 769 | py | Python | adaptivedistillation/models/distillation_losses/soft_target.py | wyze-AI/AdaptiveDistillation | 5f4575794101dbb1ed2f7e90a2be03856f76041c | [
"MIT"
] | 1 | 2022-01-12T22:24:07.000Z | 2022-01-12T22:24:07.000Z | adaptivedistillation/models/distillation_losses/soft_target.py | wyze-AI/AdaptiveDistillation | 5f4575794101dbb1ed2f7e90a2be03856f76041c | [
"MIT"
] | null | null | null | adaptivedistillation/models/distillation_losses/soft_target.py | wyze-AI/AdaptiveDistillation | 5f4575794101dbb1ed2f7e90a2be03856f76041c | [
"MIT"
] | 2 | 2022-01-12T22:24:17.000Z | 2022-02-15T05:46:30.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from ..builder import DISTILL_LOSSES
from .base_distill_loss import BaseDistillLoss
@DISTILL_LOSSES.register_module()
class SoftTarget(BaseDistillLoss):
'''
Distilling the Knowledge in a Neural Network
https://arxiv.org/pdf/1503.02531.pdf... | 29.576923 | 93 | 0.663199 |
e90609cb5bb32e8d255605bc25dc4db21b8690d3 | 749 | py | Python | workers/facade_worker/facade_worker/runtime.py | bostonossi/augur-pre-20201009 | 5641700941a882e856da05e744dfa632876cb158 | [
"MIT"
] | 2 | 2020-08-30T00:03:46.000Z | 2020-09-17T23:00:20.000Z | workers/facade_worker/facade_worker/runtime.py | bostonossi/augur-pre-20201009 | 5641700941a882e856da05e744dfa632876cb158 | [
"MIT"
] | 7 | 2020-12-06T06:25:17.000Z | 2020-12-21T00:21:34.000Z | workers/facade_worker/facade_worker/runtime.py | bostonossi/augur-pre-20201009 | 5641700941a882e856da05e744dfa632876cb158 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request, Response
import click, os, json, requests, logging
from workers.facade_worker.facade_worker.facade00mainprogram import FacadeWorker
from workers.util import create_server, WorkerGunicornApplication
def main():
""" Declares singular worker and creates the server and flask ... | 31.208333 | 125 | 0.708945 |
0b805539e2240955526c3ae8c616ab3f3d4623bf | 2,018 | py | Python | docs/scripts/_convCdbHeader.py | syun77/EscEditor5 | 2a1db292955bb734682ad4e92d692d40f747c923 | [
"MIT"
] | 1 | 2020-05-16T20:06:52.000Z | 2020-05-16T20:06:52.000Z | docs/scripts/_convCdbHeader.py | syun77/EscEditor5 | 2a1db292955bb734682ad4e92d692d40f747c923 | [
"MIT"
] | 8 | 2019-08-25T14:27:23.000Z | 2019-09-01T12:32:59.000Z | docs/scripts/_convCdbHeader.py | syun77/EscEditor5 | 2a1db292955bb734682ad4e92d692d40f747c923 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
import glob
import json
def usage():
print("Usage: _convCdbHeader.py [dat.cdb]")
class Writer:
def __init__(self):
self.buf = ""
def write(self, line, tab=0):
for i in range(tab):
self.buf += " "
self.buf += "%s\n"%line
def w... | 23.195402 | 69 | 0.588702 |
7c736db059fe5cfa782582085c5555c0fb464d74 | 1,075 | py | Python | src/profiles/migrations/0001_initial.py | adrienlina/dnd-spellbook | 4356e3a36e4805bf89071a425259ca8d2c69ed92 | [
"MIT"
] | null | null | null | src/profiles/migrations/0001_initial.py | adrienlina/dnd-spellbook | 4356e3a36e4805bf89071a425259ca8d2c69ed92 | [
"MIT"
] | null | null | null | src/profiles/migrations/0001_initial.py | adrienlina/dnd-spellbook | 4356e3a36e4805bf89071a425259ca8d2c69ed92 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import uuid
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
]
operations = [
migrations.CreateModel(
n... | 33.59375 | 138 | 0.60093 |
de0e2baa75820e2187b393e85faeeaa19909b323 | 29,479 | py | Python | run_parameter_search_new.py | marcomussi/RecommenderSystemPolimi | ce45b1eee2231abe1a844697648e94b98dadabea | [
"MIT"
] | null | null | null | run_parameter_search_new.py | marcomussi/RecommenderSystemPolimi | ce45b1eee2231abe1a844697648e94b98dadabea | [
"MIT"
] | null | null | null | run_parameter_search_new.py | marcomussi/RecommenderSystemPolimi | ce45b1eee2231abe1a844697648e94b98dadabea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on 22/11/17
@author: Maurizio Ferrari Dacrema
"""
from DataReader import dataReader
#from DataReaderWithoutValid import dataReader
from Base.NonPersonalizedRecommender import TopPop, Random
from KNN.UserKNNCFRecommender import UserKNNCFRecommender
f... | 56.150476 | 151 | 0.552699 |
4154234ae64cfb87503fb4f03360d0a3dcde2b31 | 1,647 | py | Python | scripts/setoresRede_teorico.py | ttm/articleStabilityInteractionNetworks | 051dbbdee4d4b3ec033af18621be3c6fb5a8ca83 | [
"Unlicense"
] | 1 | 2015-10-27T17:04:30.000Z | 2015-10-27T17:04:30.000Z | scripts/setoresRede_teorico.py | ttm/articleStabilityInteractionNetworks | 051dbbdee4d4b3ec033af18621be3c6fb5a8ca83 | [
"Unlicense"
] | 2 | 2015-04-07T19:03:07.000Z | 2015-04-07T23:23:17.000Z | scripts/setoresRede_teorico.py | ttm/articleStabilityInteractionNetworks | 051dbbdee4d4b3ec033af18621be3c6fb5a8ca83 | [
"Unlicense"
] | null | null | null | #-*- coding: utf8 -*-
from __future__ import division
import numpy as n, pylab as p, networkx as x, random as r, collections as c, string
from scipy import special # special.binom(x,y) ~ binom(x,y)
__doc__="""Script to plot both scale-free network and random network distributions."""
N=1200
# for the free scale netw... | 29.410714 | 88 | 0.634487 |
333b077c118e715e8047b63af79fc9d270ae501d | 5,665 | py | Python | abb_rl_algorithms/DDPG/network_actor.py | habichta/ETHZDeepReinforcementLearning | e1ae22159753724290f20068214bb3d94fcb7be4 | [
"BSD-3-Clause"
] | 7 | 2018-01-23T05:17:50.000Z | 2020-10-30T02:29:59.000Z | abb_rl_algorithms/DDPG/network_actor.py | habichta/ETHZDeepReinforcementLearning | e1ae22159753724290f20068214bb3d94fcb7be4 | [
"BSD-3-Clause"
] | null | null | null | abb_rl_algorithms/DDPG/network_actor.py | habichta/ETHZDeepReinforcementLearning | e1ae22159753724290f20068214bb3d94fcb7be4 | [
"BSD-3-Clause"
] | 2 | 2018-01-23T05:17:58.000Z | 2018-07-02T00:13:34.000Z | import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
import os
class Qnetwork():
def __init__(self, environment, img_size=84, img_sequence_len=2,img_channels=3, stream_hidden_layer_size=256,huber_delta=1.0):
"""
class to construct a DQN
:param hidden_layer_size... | 54.471154 | 197 | 0.675199 |
dba80c1e3ecf61669d589936aa84d08ed9bb0897 | 3,417 | py | Python | stRESTfulAPI/stRESTfulAPI/settings.py | sunb26/EngHack-2021-Interview-Buddy | 31a71df9bd13ffc9cff91178c8171b5ad27769b0 | [
"MIT"
] | 2 | 2021-06-26T18:06:42.000Z | 2021-06-27T17:50:09.000Z | stRESTfulAPI/stRESTfulAPI/settings.py | sunb26/EngHack-2021-Interview-Buddy | 31a71df9bd13ffc9cff91178c8171b5ad27769b0 | [
"MIT"
] | null | null | null | stRESTfulAPI/stRESTfulAPI/settings.py | sunb26/EngHack-2021-Interview-Buddy | 31a71df9bd13ffc9cff91178c8171b5ad27769b0 | [
"MIT"
] | 1 | 2021-06-28T14:10:27.000Z | 2021-06-28T14:10:27.000Z | """
Django settings for stRESTfulAPI project.
Generated by 'django-admin startproject' using Django 3.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pa... | 25.5 | 91 | 0.705004 |
c905355d9150138efd5c621bee8fb851330a3a0f | 2,096 | py | Python | web/olga/functional_tests/test_map_metrics.py | raccoongang/acceptor | fdc1504912b502c8d789d5478eba8cc1a491934b | [
"Apache-2.0"
] | 5 | 2017-10-20T05:52:59.000Z | 2020-02-25T10:46:33.000Z | web/olga/functional_tests/test_map_metrics.py | raccoongang/OLGA | fdc1504912b502c8d789d5478eba8cc1a491934b | [
"Apache-2.0"
] | 233 | 2017-08-14T10:56:16.000Z | 2021-04-07T01:09:17.000Z | web/olga/functional_tests/test_map_metrics.py | raccoongang/acceptor | fdc1504912b502c8d789d5478eba8cc1a491934b | [
"Apache-2.0"
] | 2 | 2018-03-16T22:22:57.000Z | 2018-06-15T20:02:56.000Z | """
Test for map metrics.
"""
from ddt import ddt, data, unpack
from django.test import TestCase
from olga.functional_tests.utils import SetUp, html_target
# pylint: disable=invalid-name, attribute-defined-outside-init
@ddt
class TestMapMetricsWithoutStatistics(TestCase):
"""
Test html render map metrics ... | 27.946667 | 97 | 0.660782 |
fc06dee8b3c76b9d1e3257c5ecaf6851c660c8d2 | 5,885 | py | Python | src/goasq_server.py | Morningstar/GoASQ | babfa3c8e977c9cd7c4ed21fda8b0e8fa41ff216 | [
"Apache-2.0"
] | 25 | 2018-06-13T14:15:18.000Z | 2021-04-24T05:07:44.000Z | src/goasq_server.py | Morningstar/GoASQ | babfa3c8e977c9cd7c4ed21fda8b0e8fa41ff216 | [
"Apache-2.0"
] | 6 | 2018-06-13T20:32:30.000Z | 2021-12-09T04:43:56.000Z | src/goasq_server.py | Morningstar/GoASQ | babfa3c8e977c9cd7c4ed21fda8b0e8fa41ff216 | [
"Apache-2.0"
] | 13 | 2018-06-13T06:19:12.000Z | 2021-04-21T03:30:17.000Z | # Copyright 2018 Morningstar Inc. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 39.496644 | 148 | 0.727613 |
d32c18689fd1d8cd1ffebf037171d3636b9a6443 | 191 | py | Python | ch4-message-board-app/posts/views.py | benikim/beni-django | 56a3024c93cd30bcd2f934ad304917eda827e8bd | [
"MIT"
] | 16 | 2020-09-04T17:35:45.000Z | 2021-11-02T15:06:04.000Z | ch4-message-board-app/posts/views.py | benikim/beni-django | 56a3024c93cd30bcd2f934ad304917eda827e8bd | [
"MIT"
] | 32 | 2020-02-12T16:03:14.000Z | 2021-09-22T18:37:38.000Z | ch4-message-board-app/posts/views.py | benikim/beni-django | 56a3024c93cd30bcd2f934ad304917eda827e8bd | [
"MIT"
] | 8 | 2020-09-24T17:28:58.000Z | 2022-01-13T11:58:47.000Z | from django.views.generic import ListView
from .models import Post
class HomePageView(ListView):
model = Post
template_name = 'home.html'
context_object_name = 'all_posts_list'
| 21.222222 | 42 | 0.753927 |
62d77312c6fbe03cf0ccdab3b66f71ccd277aa3b | 4,236 | py | Python | openshift/test/test_v1_self_subject_rules_review.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_self_subject_rules_review.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_self_subject_rules_review.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenShift API (with Kubernetes)
OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is... | 98.511628 | 3,380 | 0.792493 |
a67be0a63de914f02846276693489d688944af36 | 9,711 | py | Python | homeassistant/components/ios/__init__.py | nelsonov/home-assistant | c6ccbed8283ecca4a589415e4f30a2eb3563415d | [
"Apache-2.0"
] | 1 | 2018-09-21T05:43:41.000Z | 2018-09-21T05:43:41.000Z | homeassistant/components/ios/__init__.py | nelsonov/home-assistant | c6ccbed8283ecca4a589415e4f30a2eb3563415d | [
"Apache-2.0"
] | null | null | null | homeassistant/components/ios/__init__.py | nelsonov/home-assistant | c6ccbed8283ecca4a589415e4f30a2eb3563415d | [
"Apache-2.0"
] | null | null | null | """
Native Home Assistant iOS app component.
For more details about this component, please refer to the documentation at
https://home-assistant.io/ecosystem/ios/
"""
import asyncio
import logging
import datetime
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.http impo... | 32.587248 | 78 | 0.729276 |
3a0a9c5ac7453dcf3ed9193e4cf791dd49f1db78 | 387 | py | Python | dash/categories/migrations/0008_alter_category_options.py | rapidpro/dash | 71c8fcd1ab823ef31512b5ee22eca6158b3575c1 | [
"BSD-3-Clause"
] | 7 | 2015-06-25T20:09:35.000Z | 2019-02-12T17:41:46.000Z | dash/categories/migrations/0008_alter_category_options.py | rapidpro/dash | 71c8fcd1ab823ef31512b5ee22eca6158b3575c1 | [
"BSD-3-Clause"
] | 108 | 2015-01-05T13:23:57.000Z | 2022-02-10T10:55:01.000Z | dash/categories/migrations/0008_alter_category_options.py | rapidpro/dash | 71c8fcd1ab823ef31512b5ee22eca6158b3575c1 | [
"BSD-3-Clause"
] | 9 | 2015-06-15T15:13:13.000Z | 2019-01-09T18:34:20.000Z | # Generated by Django 3.2.6 on 2021-09-02 11:25
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("categories", "0007_auto_20170301_0914"),
]
operations = [
migrations.AlterModelOptions(
name="category",
options={"ordering"... | 21.5 | 80 | 0.612403 |
4e50678e996ae120ef2012a4ffec61779c608a8e | 5,385 | py | Python | docs/conf.py | AlexTISYoung/SNIPar | fbca91b1c5fff289f74066b3d320675ffc6e7f64 | [
"MIT"
] | 8 | 2020-07-05T19:56:53.000Z | 2021-11-27T15:20:19.000Z | docs/conf.py | AlexTISYoung/SNIPar | fbca91b1c5fff289f74066b3d320675ffc6e7f64 | [
"MIT"
] | 12 | 2020-07-16T14:49:05.000Z | 2021-11-04T12:39:12.000Z | docs/conf.py | AlexTISYoung/SNIPar | fbca91b1c5fff289f74066b3d320675ffc6e7f64 | [
"MIT"
] | 1 | 2020-08-06T16:40:34.000Z | 2020-08-06T16:40:34.000Z | import sphinx_rtd_theme
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup -----------------------------------... | 29.266304 | 79 | 0.648097 |
b89f54af2602f82f41b6deb27cfa96953451f803 | 2,619 | py | Python | torchcv/datasets/listdataset.py | chenyuntc/dsod.pytorch | f954085154d4fcad96f623f8572c21d8607ea698 | [
"MIT"
] | 74 | 2018-03-31T04:06:55.000Z | 2021-09-10T08:23:07.000Z | torchcv/datasets/listdataset.py | chenyuntc/dsod.pytorch | f954085154d4fcad96f623f8572c21d8607ea698 | [
"MIT"
] | 5 | 2018-04-01T06:13:17.000Z | 2019-04-15T12:34:11.000Z | torchcv/datasets/listdataset.py | chenyuntc/dsod.pytorch | f954085154d4fcad96f623f8572c21d8607ea698 | [
"MIT"
] | 15 | 2018-04-01T05:12:15.000Z | 2022-03-07T07:59:18.000Z | from __future__ import print_function
import os
import sys
import random
import torch
import torch.utils.data as data
import torchvision.transforms as transforms
from PIL import Image
class ListDataset(data.Dataset):
'''Load image/labels/boxes from a list file.
The list file is like:
a.jpg xmin ymin... | 29.426966 | 83 | 0.550592 |
c600289aec018098a9c98a2a0ee164ccd4ec2db3 | 1,458 | py | Python | src/sima/simo/blueprints/bumperdata.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/blueprints/bumperdata.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/blueprints/bumperdata.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | #
# Generated with BumperDataBlueprint
from dmt.blueprint import Blueprint
from dmt.dimension import Dimension
from dmt.attribute import Attribute
from dmt.enum_attribute import EnumAttribute
from dmt.blueprint_attribute import BlueprintAttribute
from sima.sima.blueprints.namedobject import NamedObjectBlueprint
class... | 60.75 | 121 | 0.745542 |
5c803e3ace4371ab1e38931e65c13af4ada0d345 | 11,283 | py | Python | src/translate/simplify.py | whitemech/SymBA-star | 34e9fdd1dc25f9af15c54478e39bbab422cac91a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/translate/simplify.py | whitemech/SymBA-star | 34e9fdd1dc25f9af15c54478e39bbab422cac91a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/translate/simplify.py | whitemech/SymBA-star | 34e9fdd1dc25f9af15c54478e39bbab422cac91a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
from collections import defaultdict
from itertools import count
DEBUG = False
# TODO:
# This is all quite hackish and would be easier if the translator were
# restructured so that more information is immediately available for
# the propositions, and if p... | 36.993443 | 80 | 0.619162 |
93a50ec356195600344cffee6e7e447b672d1bbd | 11,617 | py | Python | venv/lib/python2.7/site-packages/scipy/misc/common.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | null | null | null | venv/lib/python2.7/site-packages/scipy/misc/common.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | 5 | 2021-03-19T08:36:48.000Z | 2022-01-13T01:52:34.000Z | venv/lib/python2.7/site-packages/scipy/misc/common.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | 1 | 2021-04-22T11:53:31.000Z | 2021-04-22T11:53:31.000Z | """
Functions which are common and require SciPy Base and Level 1 SciPy
(special, linalg)
"""
from __future__ import division, print_function, absolute_import
import numpy
import numpy as np
from numpy import (exp, log, asarray, arange, newaxis, hstack, product, array,
zeros, eye, poly1d, r_, rolla... | 26.522831 | 93 | 0.561591 |
8b210a4dccecf18e4be8e5e74c42efc0876259fb | 3,660 | py | Python | azure-mgmt/tests/test_mgmt_dns.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 2 | 2020-07-29T14:22:17.000Z | 2020-11-06T18:47:40.000Z | azure-mgmt/tests/test_mgmt_dns.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2016-08-01T07:37:04.000Z | 2016-08-01T07:37:04.000Z | azure-mgmt/tests/test_mgmt_dns.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:17:41.000Z | 2018-11-09T06:17:41.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.
#---------------------------------------------------------------------... | 28.372093 | 103 | 0.479781 |
68b675e89a8fb10b9f526c577ff1186123cabe85 | 6,202 | py | Python | tipping/src/tests/integration/models/test_match.py | tipresias/tipresias | 8945acb8276f22f2159c24e5a1bd411e7920a79e | [
"MIT"
] | 12 | 2019-05-27T10:28:59.000Z | 2022-02-01T23:49:50.000Z | tipping/src/tests/integration/models/test_match.py | tipresias/tipresias | 8945acb8276f22f2159c24e5a1bd411e7920a79e | [
"MIT"
] | 275 | 2019-05-27T06:46:37.000Z | 2022-03-18T03:58:33.000Z | tipping/src/tests/integration/models/test_match.py | tipresias/tipresias | 8945acb8276f22f2159c24e5a1bd411e7920a79e | [
"MIT"
] | 6 | 2019-08-27T08:49:50.000Z | 2021-10-04T12:28:37.000Z | # pylint: disable=missing-docstring,redefined-outer-name
from datetime import timedelta, timezone, datetime
import numpy as np
from faker import Faker
from sqlalchemy import select, func, sql
from freezegun import freeze_time
import pytest
from tests.fixtures import data_factories, model_factories
from tipping.model... | 31.642857 | 88 | 0.69268 |
d02cacae74e50d7729d5ea086a85d7d58aaeb36c | 922 | py | Python | test/asi/auth.py | LifeLaboratory/finopolis_backend | 56aac8e0b92193c627b68f3d029f6f804d001db3 | [
"MIT"
] | null | null | null | test/asi/auth.py | LifeLaboratory/finopolis_backend | 56aac8e0b92193c627b68f3d029f6f804d001db3 | [
"MIT"
] | null | null | null | test/asi/auth.py | LifeLaboratory/finopolis_backend | 56aac8e0b92193c627b68f3d029f6f804d001db3 | [
"MIT"
] | null | null | null | import unittest
import requests as req
from app.config.config import HOST
from app.api.base.base_name import *
from asi.utils import gentext
class TestAuth(unittest.TestCase):
def test_register(self):
s = req.Session()
genned_data = gentext(6)
data = {
LOGIN: genned_data,
... | 24.918919 | 49 | 0.585683 |
85b1d780ab81867ad39096925e304b4a4d234dab | 32,826 | py | Python | kafka/coordinator/base.py | andresher/bigdata-project3 | 29b0f2fb46e68cb87b77eaae95764d572af629eb | [
"MIT"
] | 9 | 2017-05-09T14:22:57.000Z | 2018-04-25T11:48:54.000Z | Message_delivery_Kafka/push/virtualenv/lib/python2.7/site-packages/kafka/coordinator/base.py | RickeyBoy/HACKxSJTU_ChatAssistant | 12768c8b6710adb582aec6c3b40613eedc3dfeb2 | [
"Apache-2.0"
] | null | null | null | Message_delivery_Kafka/push/virtualenv/lib/python2.7/site-packages/kafka/coordinator/base.py | RickeyBoy/HACKxSJTU_ChatAssistant | 12768c8b6710adb582aec6c3b40613eedc3dfeb2 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division
import abc
import copy
import logging
import time
import weakref
from kafka.vendor import six
from .heartbeat import Heartbeat
from .. import errors as Errors
from ..future import Future
from ..metrics import AnonMeasurable
from ..metrics.stats import Avg, Count, Max,... | 43.943775 | 131 | 0.62813 |
cb24bbe4f808cfcb15da25448aae96145abdb410 | 3,651 | py | Python | wherehows-etl/src/main/resources/jython/OozieTransform.py | mikiec84/WhereHows | f2c90c57bd1f95583afc5795b03e5cdf4e35e202 | [
"Apache-2.0"
] | 7 | 2018-10-09T09:20:28.000Z | 2021-01-06T16:06:28.000Z | wherehows-etl/src/main/resources/jython/OozieTransform.py | mikiec84/WhereHows | f2c90c57bd1f95583afc5795b03e5cdf4e35e202 | [
"Apache-2.0"
] | 6 | 2020-07-21T12:49:38.000Z | 2022-02-13T02:33:47.000Z | wherehows-etl/src/main/resources/jython/OozieTransform.py | mikiec84/WhereHows | f2c90c57bd1f95583afc5795b03e5cdf4e35e202 | [
"Apache-2.0"
] | 2 | 2020-02-03T14:12:46.000Z | 2021-07-25T03:23:56.000Z | #
# Copyright 2015 LinkedIn Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 38.03125 | 130 | 0.686661 |
59bc19b03822d81d9cfe036a4972358a6d981d23 | 30,531 | py | Python | tests/regressiontests/templates/filters.py | vsajip/django | bb41826571f5e12f6f60daf3639e7d8c063d163e | [
"BSD-3-Clause"
] | 3 | 2015-10-14T09:13:48.000Z | 2021-01-01T06:31:25.000Z | tests/regressiontests/templates/filters.py | vsajip/django | bb41826571f5e12f6f60daf3639e7d8c063d163e | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/templates/filters.py | vsajip/django | bb41826571f5e12f6f60daf3639e7d8c063d163e | [
"BSD-3-Clause"
] | 1 | 2015-10-14T09:13:48.000Z | 2015-10-14T09:13:48.000Z | # coding: utf-8
"""
Tests for template filters (as opposed to template tags).
The tests are hidden inside a function so that things like timestamps and
timezones are only evaluated at the moment of execution and will therefore be
consistent.
"""
from __future__ import unicode_literals
from datetime import date, datet... | 83.418033 | 391 | 0.523075 |
728069d25b30a8abcd6d14ac8f17ad990f26493e | 802 | py | Python | UCISearch.py | membriux/UCISearch | 9dea91c267debb53690abe9cba96c93ece02057d | [
"MIT"
] | 2 | 2018-01-19T23:28:22.000Z | 2018-01-26T03:41:55.000Z | UCISearch.py | membriux/UCISearch | 9dea91c267debb53690abe9cba96c93ece02057d | [
"MIT"
] | null | null | null | UCISearch.py | membriux/UCISearch | 9dea91c267debb53690abe9cba96c93ece02057d | [
"MIT"
] | 1 | 2018-02-14T17:29:05.000Z | 2018-02-14T17:29:05.000Z |
# Creator: Guillermo Sanchez
from urllib.request import urlopen
from bs4 import BeautifulSoup
if __name__ == "__main__":
"""
This module acquires the information of a student that is searched
using their UCI Net ID, which is unique for every student and returns
a list of that student's information... | 24.30303 | 81 | 0.663342 |
024392607d894e2457439903b02df7b36ba38635 | 74,174 | py | Python | dev/Tools/build/waf-1.7.13/lmbrwaflib/lumberyard.py | brianherrera/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Tools/build/waf-1.7.13/lmbrwaflib/lumberyard.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Tools/build/waf-1.7.13/lmbrwaflib/lumberyard.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | #
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | 44.415569 | 226 | 0.683407 |
ac18570468a03315b97a0ff16996d7dcb30ca1da | 132 | py | Python | string-reverese-all.py | bhanuchandrika/pylearn | a48ac733faa72821700491c09caa9b0f0b6f559c | [
"MIT"
] | 4 | 2021-08-29T01:46:21.000Z | 2022-01-08T21:45:12.000Z | string-reverese-all.py | bhanuchandrika/pylearn | a48ac733faa72821700491c09caa9b0f0b6f559c | [
"MIT"
] | 4 | 2021-08-31T13:30:34.000Z | 2021-09-14T02:14:57.000Z | string-reverese-all.py | bhanuchandrika/pylearn | a48ac733faa72821700491c09caa9b0f0b6f559c | [
"MIT"
] | 7 | 2020-07-22T10:30:50.000Z | 2021-09-14T01:54:01.000Z |
# Reverse any random sentence - along with the letters/characters
sentence = input("Enter a sentence - ")
print(sentence[::-1])
| 22 | 65 | 0.712121 |
65bd6e31f9e23f81406a745db38a997c5d49cbb3 | 111 | py | Python | subtraction/subtraction.py | Bharathi1507/the-silver-bruisers | 673b881fec28d3acfaa1e09e08e8323c3292e3b8 | [
"MIT"
] | null | null | null | subtraction/subtraction.py | Bharathi1507/the-silver-bruisers | 673b881fec28d3acfaa1e09e08e8323c3292e3b8 | [
"MIT"
] | null | null | null | subtraction/subtraction.py | Bharathi1507/the-silver-bruisers | 673b881fec28d3acfaa1e09e08e8323c3292e3b8 | [
"MIT"
] | null | null | null | def dosubtraction(a,b):
sub=a-b
#subtraction of 2 numbers
print(sub)
a=15
b=5
dosubtraction(a,b)
| 13.875 | 29 | 0.648649 |
2cba8827db803d62dcee9cbdbbabbbaf258fb820 | 2,382 | py | Python | api/dataset/tests/test_connection_views.py | cuebook/CueSearch | 8bf047de273b27bba41b8bf4e266aac1eee7f81a | [
"Apache-2.0"
] | 3 | 2022-02-10T17:00:19.000Z | 2022-03-29T14:31:25.000Z | api/dataset/tests/test_connection_views.py | cuebook/CueSearch | 8bf047de273b27bba41b8bf4e266aac1eee7f81a | [
"Apache-2.0"
] | null | null | null | api/dataset/tests/test_connection_views.py | cuebook/CueSearch | 8bf047de273b27bba41b8bf4e266aac1eee7f81a | [
"Apache-2.0"
] | null | null | null | import pytest
import unittest
from unittest import mock
from django.test import TestCase
from django.urls import reverse
from mixer.backend.django import mixer
@pytest.mark.django_db(transaction=True)
def test_connections(client, mocker):
"""
Test case for connections
"""
# Add Connection
connect... | 37.21875 | 548 | 0.676742 |
06a9b8efab931285ff74df56deba6b0f65e1bf57 | 3,483 | py | Python | Scalable-Machine-Learning-with-Apache-Spark/Solutions/Labs/ML 09L - AutoML Lab.py | databricks-academy/scalable-machine-learning-with-apache-spark | 2b560dea766e2e6589defaaf6d9d15f361ce6db6 | [
"CC0-1.0"
] | null | null | null | Scalable-Machine-Learning-with-Apache-Spark/Solutions/Labs/ML 09L - AutoML Lab.py | databricks-academy/scalable-machine-learning-with-apache-spark | 2b560dea766e2e6589defaaf6d9d15f361ce6db6 | [
"CC0-1.0"
] | null | null | null | Scalable-Machine-Learning-with-Apache-Spark/Solutions/Labs/ML 09L - AutoML Lab.py | databricks-academy/scalable-machine-learning-with-apache-spark | 2b560dea766e2e6589defaaf6d9d15f361ce6db6 | [
"CC0-1.0"
] | 8 | 2021-12-09T19:40:48.000Z | 2022-03-24T19:19:42.000Z | # Databricks notebook source
# MAGIC %md-sandbox
# MAGIC
# MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;">
# MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px">
# MAGIC </div>
# COMMAND ----------
# M... | 46.44 | 377 | 0.716624 |
dc75c1c80f39b44ca1c6f5f747cd4ccc7ff515a0 | 31 | py | Python | referingLines.py | softgiant-nICE/blood_cells_detector-with-Python-OpenCV | 2a5dedc2868cd60c43a6662f3985b87ed6f47369 | [
"MIT"
] | null | null | null | referingLines.py | softgiant-nICE/blood_cells_detector-with-Python-OpenCV | 2a5dedc2868cd60c43a6662f3985b87ed6f47369 | [
"MIT"
] | null | null | null | referingLines.py | softgiant-nICE/blood_cells_detector-with-Python-OpenCV | 2a5dedc2868cd60c43a6662f3985b87ed6f47369 | [
"MIT"
] | null | null | null | blood_cells_detector_roi 432 | 31 | 31 | 0.870968 |
f3df12bf6c04bf48c23422b0c0bc2df246cfb1b4 | 3,435 | py | Python | bb-master/sandbox/lib/python3.5/site-packages/buildbot/worker/protocols/null.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 2 | 2017-07-11T18:56:27.000Z | 2017-07-28T14:01:12.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/worker/protocols/null.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 1 | 2017-07-28T13:53:41.000Z | 2017-07-31T15:30:40.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/worker/protocols/null.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | null | null | null | # This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | 34.009901 | 92 | 0.723435 |
62796de5cbb12cf8e7d9cb247d314daeed22f955 | 4,036 | py | Python | nuplan/database/common/sql_types.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 128 | 2021-12-06T15:41:14.000Z | 2022-03-29T13:16:32.000Z | nuplan/database/common/sql_types.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 28 | 2021-12-11T08:11:31.000Z | 2022-03-25T02:35:43.000Z | nuplan/database/common/sql_types.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 14 | 2021-12-11T04:12:26.000Z | 2022-03-24T06:38:30.000Z | """
Custom SqlAlchemy types.
https://docs.sqlalchemy.org/en/latest/core/custom_types.html
"""
import pickle
import uuid
from typing import Any, Optional
from sqlalchemy.engine import Dialect
from sqlalchemy.types import BLOB, String, TypeDecorator, TypeEngine
from nuplan.database.common.data_types import RLE, Bbox, C... | 25.707006 | 113 | 0.657086 |
200f73530f80ebe15e7988bf7195f9da0c9c35ef | 158 | py | Python | api/admin.py | amanfojnr/open-jobs-api | e70aa2c0d5031981cd571c50753fa5b28f5dce07 | [
"MIT"
] | null | null | null | api/admin.py | amanfojnr/open-jobs-api | e70aa2c0d5031981cd571c50753fa5b28f5dce07 | [
"MIT"
] | null | null | null | api/admin.py | amanfojnr/open-jobs-api | e70aa2c0d5031981cd571c50753fa5b28f5dce07 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Listing, Company
# Register your models here.
admin.site.register(Company)
admin.site.register(Listing)
| 22.571429 | 36 | 0.810127 |
b2fb72b1aef4c55dd3bc01736d715f5eb0d23cd2 | 998 | py | Python | userbot/core/decorators.py | SonicXsap/Man-Userbot | 73b90cbc2ae0df1f7f1870080b9ec8c8697aa599 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 5 | 2021-09-18T02:03:28.000Z | 2021-11-24T16:18:39.000Z | userbot/core/decorators.py | SonicXsap/Man-Userbot | 73b90cbc2ae0df1f7f1870080b9ec8c8697aa599 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 23 | 2021-08-20T16:50:46.000Z | 2022-01-14T19:05:00.000Z | userbot/core/decorators.py | SonicXsap/Man-Userbot | 73b90cbc2ae0df1f7f1870080b9ec8c8697aa599 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 8 | 2021-08-16T13:11:14.000Z | 2022-03-15T13:27:39.000Z | import asyncio
from telethon.errors import FloodWaitError, MessageNotModifiedError
from telethon.events import CallbackQuery
from userbot import ALIVE_NAME, SUDO_USERS, bot
from userbot.modules.sql_helper.globals import gvarstatus
def check_owner(func):
async def wrapper(c_q: CallbackQuery):
user = awai... | 29.352941 | 104 | 0.59018 |
812d4f82edbd7c484598c8f316ab3a0feb999585 | 624 | py | Python | test/manage.py | rkojedzinszky/django-atomic-migrations | 525cb58097fd437156a62311cb1997fb99a24bc6 | [
"MIT"
] | null | null | null | test/manage.py | rkojedzinszky/django-atomic-migrations | 525cb58097fd437156a62311cb1997fb99a24bc6 | [
"MIT"
] | null | null | null | test/manage.py | rkojedzinszky/django-atomic-migrations | 525cb58097fd437156a62311cb1997fb99a24bc6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'damt.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportErr... | 28.363636 | 73 | 0.68109 |
66e14fd4b617d047ffb7088b65563ad88c08c308 | 6,805 | py | Python | run.py | anlthms/fmc-2017 | c3f5e1b2b8a22eb63110ff69aec37ed7bf47ade8 | [
"Apache-2.0"
] | 4 | 2017-02-06T14:20:22.000Z | 2017-11-11T18:30:24.000Z | run.py | anlthms/fmc-2017 | c3f5e1b2b8a22eb63110ff69aec37ed7bf47ade8 | [
"Apache-2.0"
] | null | null | null | run.py | anlthms/fmc-2017 | c3f5e1b2b8a22eb63110ff69aec37ed7bf47ade8 | [
"Apache-2.0"
] | 2 | 2017-08-03T02:26:17.000Z | 2018-04-13T17:08:38.000Z | #!/usr/bin/env python
#
# Copyright 2017 Anil Thomas
#
# 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 appl... | 39.795322 | 89 | 0.627186 |
5a7fd3519e09e3d43841aca2f35dab092d428066 | 6,486 | py | Python | meiduo_mall/meiduo_mall/apps/goods/models.py | qls7/meiduomall | d3ce2185ec3c68325e8becddce07d0a9da144325 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/goods/models.py | qls7/meiduomall | d3ce2185ec3c68325e8becddce07d0a9da144325 | [
"MIT"
] | 9 | 2020-05-11T20:20:58.000Z | 2022-02-26T11:48:05.000Z | meiduo_mall/meiduo_mall/apps/goods/models.py | qls7/meiduomall | d3ce2185ec3c68325e8becddce07d0a9da144325 | [
"MIT"
] | null | null | null | from django.db import models
from meiduo_mall.utils.models import BaseModel
class GoodsCategory(BaseModel):
"""商品类别"""
name = models.CharField(max_length=10, verbose_name='名称')
parent = models.ForeignKey('self', related_name='subs', null=True, blank=True, on_delete=models.CASCADE,
... | 35.637363 | 120 | 0.686093 |
147d2a324c8a1ab7a3d25b9fc0e41b1e73452f76 | 1,491 | py | Python | sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/ValidatingWebhookConfigurationList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/ValidatingWebhookConfigurationList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/ValidatingWebhookConfigurationList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | import pulumi
import pulumi.runtime
from ... import tables
class ValidatingWebhookConfigurationList(pulumi.CustomResource):
"""
ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
"""
def __init__(self, __name__, __opts__=None, items=None, metadata=None):
if not __n... | 39.236842 | 97 | 0.693494 |
eefa230cd379deae9a59437955bbb260be222260 | 11,785 | py | Python | Scripted/CIP_ParenchymaSubtypeTraining/CIP_ParenchymaSubtypeTrainingLogic/SubtypingParameters.py | ihnorton/SlicerCIP | a90ece2991b074c755b1243894b67a63d3a19419 | [
"BSD-3-Clause"
] | null | null | null | Scripted/CIP_ParenchymaSubtypeTraining/CIP_ParenchymaSubtypeTrainingLogic/SubtypingParameters.py | ihnorton/SlicerCIP | a90ece2991b074c755b1243894b67a63d3a19419 | [
"BSD-3-Clause"
] | null | null | null | Scripted/CIP_ParenchymaSubtypeTraining/CIP_ParenchymaSubtypeTrainingLogic/SubtypingParameters.py | ihnorton/SlicerCIP | a90ece2991b074c755b1243894b67a63d3a19419 | [
"BSD-3-Clause"
] | null | null | null | from collections import OrderedDict
import slicer
from CIP.logic.SlicerUtil import SlicerUtil
class SubtypingParameters(object):
""" Class that stores the structure required for Chest Subtyping training
"""
# MAIN TYPES (Label, abbreviation, color)
__types__ = OrderedDict()
__types__[84] = ["ILD"... | 32.376374 | 112 | 0.564955 |
7a27c3658550c60b651e9c70103d373e1ef96beb | 849 | py | Python | link/drugbank-chebi/make_pairs.py | ShinJM/togoid-config | 1f0ea065c2d3a737dcb5e01d49e64939547cada8 | [
"MIT"
] | null | null | null | link/drugbank-chebi/make_pairs.py | ShinJM/togoid-config | 1f0ea065c2d3a737dcb5e01d49e64939547cada8 | [
"MIT"
] | null | null | null | link/drugbank-chebi/make_pairs.py | ShinJM/togoid-config | 1f0ea065c2d3a737dcb5e01d49e64939547cada8 | [
"MIT"
] | 1 | 2021-02-04T09:41:38.000Z | 2021-02-04T09:41:38.000Z | import csv
import re
from xml.etree import ElementTree
NAMESPACE = '{http://www.drugbank.ca}'
drugbank = ElementTree.parse('all-full-database.xml').getroot()
def id(drug):
for dbid in drug.findall('./{0}drugbank-id'.format(NAMESPACE)):
if re.match(r'DB\d+', dbid.text) is not None: return dbid.t... | 33.96 | 100 | 0.631331 |
bf822e44dd81fdfcbdfa708104cd974af49dfe19 | 404 | py | Python | Lib/site-packages/snowballstemmer/among.py | nemarugommula/ecommerce | 60185e79655fbaf0fcad9e877a886fe9eb3c4451 | [
"bzip2-1.0.6"
] | 547 | 2015-01-07T09:34:31.000Z | 2022-03-31T10:13:41.000Z | python/snowballstemmer/among.py | texta-tk/est-snowball | a1cf0654ded4beead22499bc2a7649a77b83c038 | [
"BSD-3-Clause"
] | 301 | 2020-10-03T10:46:31.000Z | 2022-03-27T23:46:23.000Z | python/snowballstemmer/among.py | texta-tk/est-snowball | a1cf0654ded4beead22499bc2a7649a77b83c038 | [
"BSD-3-Clause"
] | 170 | 2015-01-07T08:24:59.000Z | 2022-03-28T03:43:13.000Z |
class Among(object):
def __init__(self, s, substring_i, result, method=None):
"""
@ivar s search string
@ivar substring index to longest matching substring
@ivar result of the lookup
@ivar method method to use if substring matches
"""
self.s = s
self.... | 28.857143 | 60 | 0.60396 |
55d9c443a7b03c60ab676816b1723a2db8b3b519 | 1,679 | py | Python | recipes/thrust/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | 1 | 2021-11-11T03:07:13.000Z | 2021-11-11T03:07:13.000Z | recipes/thrust/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | 1 | 2021-11-22T13:54:48.000Z | 2021-11-22T14:09:45.000Z | recipes/thrust/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | null | null | null | from conans import ConanFile, tools
import os
required_conan_version = ">=1.33.0"
class ThrustConan(ConanFile):
name = "thrust"
license = "Apache-2.0"
description = ("Thrust is a parallel algorithms library which resembles"
"the C++ Standard Template Library (STL).")
topics = ("par... | 37.311111 | 114 | 0.623585 |
4cb96854c2fdc506c01105c79c67211440b60e86 | 3,051 | py | Python | taf/testlib/linux/dpdk.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 10 | 2016-12-16T00:05:58.000Z | 2018-10-30T17:48:25.000Z | taf/testlib/linux/dpdk.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 40 | 2017-01-04T23:07:05.000Z | 2018-04-16T19:52:02.000Z | taf/testlib/linux/dpdk.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 23 | 2016-12-30T05:03:53.000Z | 2020-04-01T08:40:24.000Z | # Copyright (c) 2016 - 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 agre... | 39.623377 | 105 | 0.599803 |
2494e03609df741fe2a3fd710a77bb6e0056b8bf | 3,423 | py | Python | src/fonduer/parser/models/paragraph.py | annelhote/fonduer | bd5b1feebfb2860286ae8b5a520b24baa023b445 | [
"MIT"
] | 379 | 2018-03-29T10:06:02.000Z | 2022-03-30T22:51:43.000Z | src/fonduer/parser/models/paragraph.py | annelhote/fonduer | bd5b1feebfb2860286ae8b5a520b24baa023b445 | [
"MIT"
] | 328 | 2018-03-29T03:34:46.000Z | 2021-09-02T21:24:41.000Z | src/fonduer/parser/models/paragraph.py | annelhote/fonduer | bd5b1feebfb2860286ae8b5a520b24baa023b445 | [
"MIT"
] | 86 | 2018-03-30T12:56:33.000Z | 2022-01-12T09:10:48.000Z | """Fonduer paragraph context model."""
from sqlalchemy import Column, ForeignKey, Integer, String, UniqueConstraint
from sqlalchemy.orm import backref, relationship
from fonduer.parser.models.context import Context
class Paragraph(Context):
"""A paragraph Context in a Document.
Represents a grouping of adja... | 33.23301 | 88 | 0.577856 |
9104feced7f4c579000a62459d451323ce203662 | 85,708 | py | Python | elastalert/elastalert.py | dpolonsky/elastalert | f17f3533e853367f4a573726a59293732bb89b2e | [
"Apache-2.0"
] | null | null | null | elastalert/elastalert.py | dpolonsky/elastalert | f17f3533e853367f4a573726a59293732bb89b2e | [
"Apache-2.0"
] | null | null | null | elastalert/elastalert.py | dpolonsky/elastalert | f17f3533e853367f4a573726a59293732bb89b2e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import copy
import datetime
import json
import logging
import os
import signal
import sys
import time
import timeit
import traceback
from email.mime.text import MIMEText
from smtplib import SMTP
from smtplib import SMTPException
from socket import error
import dateutil.tz
import... | 44.500519 | 137 | 0.571697 |
7320db0c97899c9d9b87eaaa322dbd1ba36c8166 | 3,094 | py | Python | src/my_blogg/settings.py | Abdullah-Hanouna/Blog_django_ar | 615b44e9a0b6b5a87f87d8c936e7709c92d5c516 | [
"bzip2-1.0.6"
] | null | null | null | src/my_blogg/settings.py | Abdullah-Hanouna/Blog_django_ar | 615b44e9a0b6b5a87f87d8c936e7709c92d5c516 | [
"bzip2-1.0.6"
] | null | null | null | src/my_blogg/settings.py | Abdullah-Hanouna/Blog_django_ar | 615b44e9a0b6b5a87f87d8c936e7709c92d5c516 | [
"bzip2-1.0.6"
] | null | null | null | """
Django settings for my_blogg project.
Generated by 'django-admin startproject' using Django 2.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | 25.570248 | 91 | 0.697479 |
26bb119ca0bb1fe0a40731b6929b8618bcc6f090 | 3,650 | py | Python | drqa/reader/lang_disc.py | himanshu746/DrQA | 399131d0568c4fe3628518eed8578f14e6c8e4b8 | [
"BSD-3-Clause"
] | 2 | 2020-05-11T18:46:50.000Z | 2020-05-11T18:47:36.000Z | drqa/reader/lang_disc.py | himanshu746/DrQA | 399131d0568c4fe3628518eed8578f14e6c8e4b8 | [
"BSD-3-Clause"
] | null | null | null | drqa/reader/lang_disc.py | himanshu746/DrQA | 399131d0568c4fe3628518eed8578f14e6c8e4b8 | [
"BSD-3-Clause"
] | null | null | null | import torch
from torch import autograd, nn
import torch.nn.functional as functional
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
"""
Ref : https://github.com/ccsasuke/adan/blob/master/code/models.py
"""
class LanguageDetector(nn.Module):
def __init__(self,
num_laye... | 37.628866 | 119 | 0.579726 |
ec6591611f0e7347e8ee5f112ba0f96ccc6d171d | 1,524 | py | Python | bases_2021_1S/Grupo 08/Tytus/server/routes/analizer/statement/functions/current.py | dadu0699/tytus | e1920f6932c840859e3e79eb8756a1d3da88bd77 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | bases_2021_1S/Grupo 08/Tytus/server/routes/analizer/statement/functions/current.py | dadu0699/tytus | e1920f6932c840859e3e79eb8756a1d3da88bd77 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | bases_2021_1S/Grupo 08/Tytus/server/routes/analizer/statement/functions/current.py | dadu0699/tytus | e1920f6932c840859e3e79eb8756a1d3da88bd77 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from routes.analizer.abstract.expression import Expression, TYPE
from routes.analizer.abstract import expression
from routes.analizer.reports import Nodo
from datetime import datetime
from routes.analizer.statement.expressions.primitive import Primitive
class Current(Expression):
def __init__(self, val, optStr, r... | 34.636364 | 82 | 0.544619 |
acc6db163749390006060368d4e377d49478add9 | 3,399 | py | Python | examples/vector_uncoupled.py | rowanc1/verde | 7c4315d2b6d23348a1f5a37970475b7463644f63 | [
"BSD-3-Clause"
] | null | null | null | examples/vector_uncoupled.py | rowanc1/verde | 7c4315d2b6d23348a1f5a37970475b7463644f63 | [
"BSD-3-Clause"
] | null | null | null | examples/vector_uncoupled.py | rowanc1/verde | 7c4315d2b6d23348a1f5a37970475b7463644f63 | [
"BSD-3-Clause"
] | null | null | null | """
Gridding 2D vectors
===================
We can use :class:`verde.Vector` to simultaneously process and grid all
components of vector data. Each component is processed and gridded separately
(see `Erizo <https://github.com/fatiando/erizo>`__ for an elastically coupled
alternative) but we have the convenience of dea... | 33 | 87 | 0.723742 |
f141ab47cfb24cc440932457cf98350b39366ee6 | 814 | py | Python | regexlib/python_re_test_file/regexlib_1338.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | 1 | 2022-01-24T14:43:23.000Z | 2022-01-24T14:43:23.000Z | regexlib/python_re_test_file/regexlib_1338.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | regexlib/python_re_test_file/regexlib_1338.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | # 1338
# ^([\!#\$%&'\*\+/\=?\^`\{\|\}~a-zA-Z0-9_-]+[\.]?)+[\!#\$%&'\*\+/\=?\^`\{\|\}~a-zA-Z0-9_-]+@{1}((([0-9A-Za-z_-]+)([\.]{1}[0-9A-Za-z_-]+)*\.{1}([A-Za-z]){1,6})|(([0-9]{1,3}[\.]{1}){3}([0-9]{1,3}){1}))$
# EXPONENT
# nums:4
# EXPONENT AttackString:""+"!"*32+"!1 __NQ"
import re
from time import perf_counter
regex ... | 42.842105 | 212 | 0.423833 |
3b673c2d5d703ab801ab2d9937d5ae550d37a171 | 466 | py | Python | puresnmp/test/asyncmock.py | jetbridge/puresnmp | 446ca03b1bd581c4fc2a167c7b33bdca4ac68b49 | [
"MIT"
] | null | null | null | puresnmp/test/asyncmock.py | jetbridge/puresnmp | 446ca03b1bd581c4fc2a167c7b33bdca4ac68b49 | [
"MIT"
] | null | null | null | puresnmp/test/asyncmock.py | jetbridge/puresnmp | 446ca03b1bd581c4fc2a167c7b33bdca4ac68b49 | [
"MIT"
] | null | null | null | # pylint: skip-file
# type: ignore
try:
from unittest.mock import MagicMock
except ImportError:
from mock import MagicMock # type: ignore
class AsyncMock(MagicMock):
async def __call__(self, *args, **kwargs):
return super(AsyncMock, self).__call__(*args, **kwargs)
class AsyncGenMock(MagicMock... | 23.3 | 72 | 0.678112 |
eb48e0c94ac1ad3f82bb2c78dce34d31419f8ed2 | 45,868 | py | Python | artistools/lightcurve/plotlightcurve.py | artis-mcrt/artistools | 40f78d87fa5cd50f08731a63a9fc2ecb85c7e06d | [
"MIT"
] | 7 | 2021-04-12T12:08:40.000Z | 2021-12-22T12:29:27.000Z | artistools/lightcurve/plotlightcurve.py | artis-mcrt/artistools | 40f78d87fa5cd50f08731a63a9fc2ecb85c7e06d | [
"MIT"
] | 8 | 2021-04-06T15:02:14.000Z | 2022-03-02T11:38:35.000Z | artistools/lightcurve/plotlightcurve.py | artis-mcrt/artistools | 40f78d87fa5cd50f08731a63a9fc2ecb85c7e06d | [
"MIT"
] | 1 | 2021-07-19T14:11:46.000Z | 2021-07-19T14:11:46.000Z | #!/usr/bin/env python3
import argparse
# import glob
# import itertools
import math
import multiprocessing
import os
# import sys
from pathlib import Path
from typing import Iterable
import numpy as np
import pandas as pd
import artistools as at
import artistools.spectra
import artistools.plottools
import matplotlib... | 45.056974 | 128 | 0.608093 |
72b2fa4a0a45aec70cd6c3ef5b9d1903d5a6985c | 72,636 | py | Python | sympy/sets/sets.py | caley/sympy | 7dfa5ceadf8b1500119583b33c70b618b59ca7ac | [
"BSD-3-Clause"
] | 1 | 2021-02-04T16:08:07.000Z | 2021-02-04T16:08:07.000Z | sympy/sets/sets.py | caley/sympy | 7dfa5ceadf8b1500119583b33c70b618b59ca7ac | [
"BSD-3-Clause"
] | null | null | null | sympy/sets/sets.py | caley/sympy | 7dfa5ceadf8b1500119583b33c70b618b59ca7ac | [
"BSD-3-Clause"
] | null | null | null | from typing import Optional
from collections import defaultdict
import inspect
from sympy.core.basic import Basic
from sympy.core.compatibility import iterable, ordered, reduce
from sympy.core.containers import Tuple
from sympy.core.decorators import (deprecated, sympify_method_args,
sympify_return)
from sympy.co... | 28.82381 | 97 | 0.566826 |
2a1ad3a62ec5ce0429ab1225fc17ee679e82f4fd | 464 | py | Python | messenger/chats/serializers.py | dvalentina/2019-2-Track-Backend-V-Danilova | 42a05b286aadc5d05160ba91f6760edca3ddcfb9 | [
"MIT"
] | null | null | null | messenger/chats/serializers.py | dvalentina/2019-2-Track-Backend-V-Danilova | 42a05b286aadc5d05160ba91f6760edca3ddcfb9 | [
"MIT"
] | 27 | 2020-03-11T10:08:08.000Z | 2022-03-12T00:13:21.000Z | messenger/chats/serializers.py | dvalentina/2019-2-Track-Backend-V-Danilova | 42a05b286aadc5d05160ba91f6760edca3ddcfb9 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from chats.models import Chat, Member
class СhatSerializer(serializers.ModelSerializer):
class Meta:
model = Chat
fields = ('id', 'is_group_chat', 'topic')
class MemberSerializer(serializers.ModelSerializer):
class Meta:
model = Member
fie... | 25.777778 | 54 | 0.678879 |
633ae85fff09cb78e002be55cfa50fa7c776a111 | 7,121 | py | Python | lib/datasets/voc_eval.py | dishenwx/tf-faster-rcnn | 956a75c8a4e8292e2322e565d6b7b5f1029c23a3 | [
"MIT"
] | null | null | null | lib/datasets/voc_eval.py | dishenwx/tf-faster-rcnn | 956a75c8a4e8292e2322e565d6b7b5f1029c23a3 | [
"MIT"
] | null | null | null | lib/datasets/voc_eval.py | dishenwx/tf-faster-rcnn | 956a75c8a4e8292e2322e565d6b7b5f1029c23a3 | [
"MIT"
] | 1 | 2018-03-05T02:40:09.000Z | 2018-03-05T02:40:09.000Z | # --------------------------------------------------------
# Fast/er R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Bharath Hariharan
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import pr... | 31.370044 | 76 | 0.571268 |
0fb735743fbd26e4991530e5667dd5a120d2853d | 1,473 | py | Python | turn.py | evachristinschwesig/codebreaker | caea5beaae9c853cfd7708eeb26dee8a58bef506 | [
"MIT"
] | null | null | null | turn.py | evachristinschwesig/codebreaker | caea5beaae9c853cfd7708eeb26dee8a58bef506 | [
"MIT"
] | null | null | null | turn.py | evachristinschwesig/codebreaker | caea5beaae9c853cfd7708eeb26dee8a58bef506 | [
"MIT"
] | null | null | null | from collections import Counter
class Turn:
# Colors
black = (0, 0, 0)
white = (255, 255, 255)
empty = (210, 180, 140)
def __init__(self, slots, curr_turn):
self.slots = slots
self.guess = []
self.hint = []
self.curr_turn = curr_turn
self.selected_slot = N... | 24.966102 | 94 | 0.553971 |
daaf1ff2b71646972dc105630c94314f12935740 | 9,832 | py | Python | app/backend/knowledge_base_approach/src/manager.py | e-lubrini/fake-news-detector | f2464e4cac73d9203e7483ac0aa5cd47ddfba811 | [
"MIT"
] | null | null | null | app/backend/knowledge_base_approach/src/manager.py | e-lubrini/fake-news-detector | f2464e4cac73d9203e7483ac0aa5cd47ddfba811 | [
"MIT"
] | 1 | 2021-11-24T12:23:49.000Z | 2021-11-24T12:23:49.000Z | app/backend/knowledge_base_approach/src/manager.py | e-lubrini/fake-news-detector | f2464e4cac73d9203e7483ac0aa5cd47ddfba811 | [
"MIT"
] | 1 | 2021-11-24T18:07:44.000Z | 2021-11-24T18:07:44.000Z | import os
import shutil
import argparse
import subprocess
from deepex.utils import *
from requests import get
def SysCall(command):
subprocess.Popen(
command,
shell=True
).wait()
def PreprocessData(META_TASK, RAW_PATH, DATA_PATH):
if META_TASK in ["OIE_2016"]:
Create... | 49.908629 | 196 | 0.566416 |
118e7b824c9a2dddf4ae31d9a245a81ea608df11 | 3,558 | py | Python | net/data/verify_certificate_chain_unittest/key-rollover/generate-chains.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | net/data/verify_certificate_chain_unittest/key-rollover/generate-chains.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | net/data/verify_certificate_chain_unittest/key-rollover/generate-chains.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright (c) 2016 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.
"""A certificate tree with two self-signed root certificates(oldroot, newroot),
and a third root certificate (newrootrollover) whic... | 40.431818 | 80 | 0.699831 |
cc0efb6ef17c5984c4037a50c1b976e7ab3b6d0c | 2,605 | py | Python | setup.py | d70-t/imapclient | 843dc0725148c7518244ab3c5e9ba53ac0e53035 | [
"BSD-3-Clause"
] | 406 | 2016-08-29T12:57:51.000Z | 2022-03-22T19:43:11.000Z | setup.py | d70-t/imapclient | 843dc0725148c7518244ab3c5e9ba53ac0e53035 | [
"BSD-3-Clause"
] | 296 | 2015-12-03T22:30:47.000Z | 2022-03-29T10:58:02.000Z | setup.py | d70-t/imapclient | 843dc0725148c7518244ab3c5e9ba53ac0e53035 | [
"BSD-3-Clause"
] | 84 | 2016-08-30T01:50:11.000Z | 2022-03-20T13:18:45.000Z | #!/usr/bin/env python
# Copyright (c) 2017, Menno Smits
# Released subject to the New BSD License
# Please see http://en.wikipedia.org/wiki/BSD_licenses
import sys
from os import path
from setuptools import setup
MAJ_MIN_MIC = sys.version_info[:3]
IS_PY3 = MAJ_MIN_MIC >= (3, 0, 0)
# Read version info
here = path.d... | 33.397436 | 91 | 0.688676 |
f070139a86eb6f3de57e0e0c5066497af4d71a36 | 4,003 | py | Python | code/ReID_net/Forwarding/MOT15Forwarder.py | GeniusGaryant/PReMVOS | 53c5fac37fb57429d0046b77a491009d7b81607f | [
"MIT"
] | null | null | null | code/ReID_net/Forwarding/MOT15Forwarder.py | GeniusGaryant/PReMVOS | 53c5fac37fb57429d0046b77a491009d7b81607f | [
"MIT"
] | null | null | null | code/ReID_net/Forwarding/MOT15Forwarder.py | GeniusGaryant/PReMVOS | 53c5fac37fb57429d0046b77a491009d7b81607f | [
"MIT"
] | null | null | null | from .Forwarder import Forwarder
import numpy
from Log import log
import time
class MOT15Forwarder(Forwarder):
def __init__(self, engine):
super(MOT15Forwarder, self).__init__(engine)
self.data = engine.valid_data.seq_data.eval()
self.engine = engine
def forward(self, network, data, save_results=True,... | 36.724771 | 132 | 0.664751 |
599b91e2c2a796484ede589dc769df9afe5dd85f | 2,082 | py | Python | server/src/resources/movie.py | Theo-Cheynel/centrale | 65c0e2b12e3ea7f094badd4f2cfc601f7a1bf519 | [
"MIT"
] | null | null | null | server/src/resources/movie.py | Theo-Cheynel/centrale | 65c0e2b12e3ea7f094badd4f2cfc601f7a1bf519 | [
"MIT"
] | null | null | null | server/src/resources/movie.py | Theo-Cheynel/centrale | 65c0e2b12e3ea7f094badd4f2cfc601f7a1bf519 | [
"MIT"
] | null | null | null | """
Define the REST verbs relative to the movies
"""
from flasgger import swag_from
from flask.json import jsonify
from flask_restful import Resource
from flask_restful.reqparse import Argument
from repositories import MovieRepository
from util import parse_params
class MovieResource(Resource):
""" Verbs relati... | 40.823529 | 104 | 0.661383 |
2a2859fc9b5fbb694b103f756af1797222fc8629 | 5,125 | py | Python | examples/python/gui/add-geometry.py | leomariga/Open3D | d197339fcd29ad0803a182ef8953d89e563f94d7 | [
"MIT"
] | 1 | 2021-08-06T06:16:08.000Z | 2021-08-06T06:16:08.000Z | examples/python/gui/add-geometry.py | leomariga/Open3D | d197339fcd29ad0803a182ef8953d89e563f94d7 | [
"MIT"
] | null | null | null | examples/python/gui/add-geometry.py | leomariga/Open3D | d197339fcd29ad0803a182ef8953d89e563f94d7 | [
"MIT"
] | 1 | 2021-07-23T15:15:04.000Z | 2021-07-23T15:15:04.000Z | import open3d as o3d
import open3d.visualization.gui as gui
import open3d.visualization.rendering as rendering
import platform
import random
import threading
import time
isMacOS = (platform.system() == "Darwin")
# This example shows two methods of adding geometry to an existing scene.
# 1) add via a UI callback (in ... | 40.039063 | 81 | 0.611122 |
720199cfb2aa1b40907d0fbaa4cc1371f0d16c71 | 9,575 | py | Python | packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickformatstop(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.radialaxis"
_path_str = "layout.polar.radialaxis.tickformatstop"
_va... | 33.714789 | 84 | 0.570757 |
5b7a8a948b52591954a734a13f571146613a13c4 | 573 | py | Python | repository/auth.py | M-U-I-N-D-O/muindo-server | bbb3acfad164c51c4ab0910037cb6f45dcb7a0a5 | [
"MIT"
] | null | null | null | repository/auth.py | M-U-I-N-D-O/muindo-server | bbb3acfad164c51c4ab0910037cb6f45dcb7a0a5 | [
"MIT"
] | 7 | 2021-06-17T12:08:52.000Z | 2021-06-28T15:07:31.000Z | repository/auth.py | M-U-I-N-D-O/muindo-server | bbb3acfad164c51c4ab0910037cb6f45dcb7a0a5 | [
"MIT"
] | 1 | 2021-06-18T04:42:11.000Z | 2021-06-18T04:42:11.000Z | from model import db
from model.models import User
def db_check_if_not_insert_to_db_and_get_user_id(email, name, provider, unique_id):
user = User.query.filter_by(uid=unique_id).first()
if not user:
user = User(name=name, email=email, uid=unique_id, oauth=provider)
db.session.add(user)... | 33.705882 | 84 | 0.69459 |
73822e9f90c410a889173e07dfa0a8dacac90049 | 5,467 | py | Python | _doc/examples/plot_jcustom_syntax.py | sdpython/onnxcustom | ac253aa8b276ea34527fa61897792e61668fc216 | [
"MIT"
] | 7 | 2021-12-20T07:30:34.000Z | 2022-01-25T00:10:44.000Z | _doc/examples/plot_jcustom_syntax.py | sdpython/onnxcustom | ac253aa8b276ea34527fa61897792e61668fc216 | [
"MIT"
] | 15 | 2020-07-09T17:02:52.000Z | 2022-02-12T00:33:05.000Z | _doc/examples/plot_jcustom_syntax.py | sdpython/onnxcustom | ac253aa8b276ea34527fa61897792e61668fc216 | [
"MIT"
] | 3 | 2020-07-14T20:52:54.000Z | 2021-12-20T07:30:47.000Z | """
Two ways to implement a converter
=================================
.. index:: syntax
There are two ways to write a converter. The first one
is very verbose (see `ada_boost.py <https://github.com/onnx/
sklearn-onnx/blob/master/skl2onnx/operator_converters/ada_boost.py>`_
for an example). The other is less verbose... | 30.038462 | 69 | 0.664533 |
5686c3f0b0a44acf48b77f76425313aaddc3d871 | 727 | py | Python | conans/test/unittests/util/local_db_test.py | Ignition/conan | 84a38590987ecb9f3011f73babc95598ea62535f | [
"MIT"
] | 2 | 2020-02-12T09:56:25.000Z | 2022-03-03T06:41:35.000Z | conans/test/unittests/util/local_db_test.py | Ignition/conan | 84a38590987ecb9f3011f73babc95598ea62535f | [
"MIT"
] | 6 | 2016-03-08T22:06:45.000Z | 2020-06-02T15:22:19.000Z | conans/test/unittests/util/local_db_test.py | Ignition/conan | 84a38590987ecb9f3011f73babc95598ea62535f | [
"MIT"
] | 2 | 2019-08-07T18:15:16.000Z | 2021-08-04T12:33:05.000Z | import os
import unittest
from conans.client.store.localdb import LocalDB
from conans.test.utils.test_files import temp_folder
class LocalStoreTest(unittest.TestCase):
def localdb_test(self):
tmp_dir = temp_folder()
db_file = os.path.join(tmp_dir, "dbfile")
localdb = LocalDB.create(db_fi... | 29.08 | 64 | 0.667125 |
e42d7b0d9feb89efa401affcc8a979cfc0add080 | 460 | py | Python | protonets/utils/data.py | gabrielhuang/prototypical-networks | e363420b627c4a558eccde6b72e179b632d183c5 | [
"MIT"
] | 26 | 2019-02-21T17:01:19.000Z | 2021-12-12T08:26:38.000Z | protonets/utils/data.py | gabrielhuang/centroid-networks | e363420b627c4a558eccde6b72e179b632d183c5 | [
"MIT"
] | null | null | null | protonets/utils/data.py | gabrielhuang/centroid-networks | e363420b627c4a558eccde6b72e179b632d183c5 | [
"MIT"
] | null | null | null | import protonets.data
def load(opt, splits):
if opt['data.dataset'] == 'omniglot':
ds = protonets.data.omniglot.load(opt, splits)
elif opt['data.dataset'] == 'omniglot_ccn':
ds = protonets.data.omniglot_ccn.load(opt, splits)
elif opt['data.dataset'] == 'miniimagenet':
ds = protonets... | 32.857143 | 77 | 0.645652 |
cbe002856a7905e51933b40288cd9e432a164e49 | 19,320 | py | Python | api/namex/models/request.py | rarmitag/namex | 1b308bf96130619d4a61d44e075cc7ab177dc6cd | [
"Apache-2.0"
] | null | null | null | api/namex/models/request.py | rarmitag/namex | 1b308bf96130619d4a61d44e075cc7ab177dc6cd | [
"Apache-2.0"
] | 2 | 2019-01-14T23:59:11.000Z | 2019-01-30T16:09:16.000Z | api/namex/models/request.py | rarmitag/namex | 1b308bf96130619d4a61d44e075cc7ab177dc6cd | [
"Apache-2.0"
] | null | null | null | """Request is the main business class that is the real top level object in the system
"""
from . import db, ma
from flask import current_app
from namex.exceptions import BusinessException
from sqlalchemy import event
from sqlalchemy.orm import backref
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy im... | 40.503145 | 138 | 0.625828 |
cc94bf13b248e0063acfa91d71f4e4f6b598f2c6 | 12,793 | py | Python | sched/adaptdl_sched/allocator.py | pandyakaa/adaptdl | e5bb7ddfbc71e3f05dbdfc2e697300ef3a3931ed | [
"Apache-2.0"
] | 1 | 2021-04-15T04:29:27.000Z | 2021-04-15T04:29:27.000Z | sched/adaptdl_sched/allocator.py | pandyakaa/adaptdl | e5bb7ddfbc71e3f05dbdfc2e697300ef3a3931ed | [
"Apache-2.0"
] | null | null | null | sched/adaptdl_sched/allocator.py | pandyakaa/adaptdl | e5bb7ddfbc71e3f05dbdfc2e697300ef3a3931ed | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Petuum, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.962199 | 79 | 0.595482 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.