hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
023fa6bbd20b990b812f3f037de938b8c58a24d0 | 2,811 | py | Python | cloudpredictionframework/anomaly_detection/algorithms/hybrid_algorithm.py | Fruktus/CloudPredictionFramework | 1474287cc9bdfd58ae92db7bc24966a7e600258f | [
"MIT"
] | 1 | 2021-11-19T13:13:20.000Z | 2021-11-19T13:13:20.000Z | cloudpredictionframework/anomaly_detection/algorithms/hybrid_algorithm.py | Fruktus/CloudPredictionFramework | 1474287cc9bdfd58ae92db7bc24966a7e600258f | [
"MIT"
] | null | null | null | cloudpredictionframework/anomaly_detection/algorithms/hybrid_algorithm.py | Fruktus/CloudPredictionFramework | 1474287cc9bdfd58ae92db7bc24966a7e600258f | [
"MIT"
] | null | null | null | from statistics import mean
from collections import defaultdict
from cloudpredictionframework.anomaly_detection.algorithms.base_algorithm import BaseAlgorithm
| 41.338235 | 116 | 0.644966 |
02426c5e9ebc5b6e7797b501d9a365d58338fa41 | 159 | py | Python | Defer/__init__.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | Defer/__init__.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | Defer/__init__.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | __all__ = ['Defer']
from contextlib import contextmanager, ExitStack
| 19.875 | 48 | 0.72327 |
024385bec991016fbb9a7b197fba1d40d6b4f297 | 9,798 | py | Python | jsonmerge/strategies.py | open-contracting-archive/jsonmerge | 2b87eea10bed3aa380cb28034a96783ac3081a85 | [
"Unlicense"
] | null | null | null | jsonmerge/strategies.py | open-contracting-archive/jsonmerge | 2b87eea10bed3aa380cb28034a96783ac3081a85 | [
"Unlicense"
] | 3 | 2015-09-16T15:37:05.000Z | 2015-09-16T16:32:26.000Z | jsonmerge/strategies.py | open-contracting-archive/jsonmerge | 2b87eea10bed3aa380cb28034a96783ac3081a85 | [
"Unlicense"
] | null | null | null | # vim:ts=4 sw=4 expandtab softtabstop=4
from jsonmerge.exceptions import HeadInstanceError, \
BaseInstanceError, \
SchemaError
import jsonschema
import re
| 31.504823 | 112 | 0.557359 |
0243fa264d20be4663ad37da1958e0275ed6a559 | 3,100 | py | Python | ArcGISDesktop/reconcile_post_versions.py | jonhusen/ArcGIS | 1d39a627888ce6039c490cdad810cd6d8035cb77 | [
"MIT"
] | null | null | null | ArcGISDesktop/reconcile_post_versions.py | jonhusen/ArcGIS | 1d39a627888ce6039c490cdad810cd6d8035cb77 | [
"MIT"
] | null | null | null | ArcGISDesktop/reconcile_post_versions.py | jonhusen/ArcGIS | 1d39a627888ce6039c490cdad810cd6d8035cb77 | [
"MIT"
] | null | null | null | """
Reconcile and posting versions at 10.0
TODO:WIP
"""
import arcpy, os, sys, string
#Populate parent and child versions in the following manner('Parent':'Child', etc). DO NOT LIST DEFAULT
vTree = {'SDE.Parent':'SDE.Child','SDE.QA':'SDE.Edit'}
#Reconcile and post child versions with parent
#Reconcile and post wit... | 40.789474 | 148 | 0.709677 |
024430ea1d89420e6939d1c770a6a86ca49668e5 | 4,626 | py | Python | example/F3Dp/F3D_syn.py | Chunfang/defmod-swpc | 74fe7c02b24a46aa24bca7438738aa5adb72e2b6 | [
"MIT"
] | 26 | 2017-05-12T08:11:57.000Z | 2022-03-06T01:44:24.000Z | example/F3Dp/F3D_syn.py | Soengmou/defmod-swpc | 75740fca3b36107e9d18201a5623c955f6010740 | [
"MIT"
] | 4 | 2019-09-11T15:35:16.000Z | 2020-06-23T10:49:34.000Z | example/F3Dp/F3D_syn.py | Chunfang/defmod-swpc | 74fe7c02b24a46aa24bca7438738aa5adb72e2b6 | [
"MIT"
] | 8 | 2017-05-22T18:40:13.000Z | 2021-02-10T08:04:39.000Z | #!/usr/bin/env python
import numpy as np
import os,sys
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import pyplot as plt
import argparse
ap=argparse.ArgumentParser()
ap.add_argument('-vis') # 1 plot cropped point cloud
ap.add_argument('-refine') # 1 refine mesh
ap.add_argument('-clean') # 1 remove tmp... | 34.266667 | 115 | 0.635754 |
0244e0d25129f6105b7892408951f27b584d128e | 2,850 | py | Python | fltk/util/data_loader_utils.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | null | null | null | fltk/util/data_loader_utils.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | 2 | 2021-05-11T12:48:14.000Z | 2021-05-11T12:49:24.000Z | fltk/util/data_loader_utils.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | 2 | 2021-05-03T17:40:18.000Z | 2021-05-11T09:34:30.000Z | import numpy
from torch.utils.data import DataLoader
import os
import pickle
import random
from ..datasets import Dataset
def generate_data_loaders_from_distributed_dataset(distributed_dataset, batch_size):
"""
Generate data loaders from a distributed dataset.
:param distributed_dataset: Distributed data... | 31.318681 | 138 | 0.729825 |
024580a7ff506aa3cbda6d46122b84b1603a6c05 | 794 | py | Python | pywikibot/families/omegawiki_family.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | pywikibot/families/omegawiki_family.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | pywikibot/families/omegawiki_family.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__version__ = '$Id: 024580a7ff506aa3cbda6d46122b84b1603a6c05 $'
from pywikibot import family
# Omegawiki, the Ultimate online dictionary
| 22.685714 | 82 | 0.632242 |
024a818dbea659d940b31f646bbc0d73684c65d8 | 4,781 | py | Python | tools/scripts/extract_features_WORLD.py | feelins/mcd_WORLD | 8a98c1c740ec5371a322d038b8498cb72f3f7750 | [
"BSD-3-Clause"
] | 5 | 2019-05-16T11:42:21.000Z | 2022-03-25T22:25:35.000Z | tools/scripts/extract_features_WORLD.py | feelins/mcd_WORLD | 8a98c1c740ec5371a322d038b8498cb72f3f7750 | [
"BSD-3-Clause"
] | null | null | null | tools/scripts/extract_features_WORLD.py | feelins/mcd_WORLD | 8a98c1c740ec5371a322d038b8498cb72f3f7750 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import shutil
import glob
import time
import multiprocessing as mp
if len(sys.argv)!=4:
print("Usage: ")
print("python extract_features_WORLD.py <path_to_wav_dir> <path_to_feat_dir> <sampling rate>")
sys.exit(1)
# top currently directory
current_dir = os.getcwd()
# input audio direct... | 34.89781 | 116 | 0.535244 |
024b2b7d9d7075b55a314e3428f50fdfaf0a011e | 19,261 | py | Python | mmtbx/bulk_solvent/f_model_all_scales.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | mmtbx/bulk_solvent/f_model_all_scales.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | mmtbx/bulk_solvent/f_model_all_scales.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
from cctbx.array_family import flex
from cctbx import adptbx
from mmtbx import bulk_solvent
from cctbx.array_family import flex
from cctbx import adptbx
import mmtbx
from libtbx import group_args
import mmtbx.arrays
import mmtbx.bulk_solvent.scaler
from l... | 44.380184 | 82 | 0.626343 |
024c1d679000935d415d1310cd2a49a746f73e4a | 4,704 | py | Python | pysparkpro/dsl/nodesbak.py | liaoxiong3x/pyspark | 2a16ad495780b1b37f5dc571cb7ea11260765366 | [
"Apache-2.0"
] | null | null | null | pysparkpro/dsl/nodesbak.py | liaoxiong3x/pyspark | 2a16ad495780b1b37f5dc571cb7ea11260765366 | [
"Apache-2.0"
] | null | null | null | pysparkpro/dsl/nodesbak.py | liaoxiong3x/pyspark | 2a16ad495780b1b37f5dc571cb7ea11260765366 | [
"Apache-2.0"
] | null | null | null | from session.abstract_class import PysparkPro
if __name__ == '__main__':
spark = DslAdaptor()
print(spark)
| 26.426966 | 83 | 0.650298 |
024c4ab64cff5513fb1d36a41a43c50162ebb3f1 | 821 | py | Python | backdoor/detect_buffer_overflow.py | Sanardi/bored | 2816395b99c05871f01fbbd55a833dcd13801014 | [
"MIT"
] | null | null | null | backdoor/detect_buffer_overflow.py | Sanardi/bored | 2816395b99c05871f01fbbd55a833dcd13801014 | [
"MIT"
] | null | null | null | backdoor/detect_buffer_overflow.py | Sanardi/bored | 2816395b99c05871f01fbbd55a833dcd13801014 | [
"MIT"
] | null | null | null | import socket
if __name__ == "__main__":
PORT = 12345
SERVER = '<THE HOSTNAME OR IP>'
s = connect(SERVER, PORT)
print(read_until(s))
| 23.457143 | 58 | 0.548112 |
024c6205dd81c6aee9436b9f31977f458d63fa70 | 3,384 | py | Python | tools/test.py | EMinsight/MPh | 2b967b77352f9ce7effcd50ad4774bf5eaf731ea | [
"MIT"
] | null | null | null | tools/test.py | EMinsight/MPh | 2b967b77352f9ce7effcd50ad4774bf5eaf731ea | [
"MIT"
] | null | null | null | tools/test.py | EMinsight/MPh | 2b967b77352f9ce7effcd50ad4774bf5eaf731ea | [
"MIT"
] | null | null | null | """
Runs all tests in the intended order.
Each test script (in the `tests` folder) contains a group of tests.
These scripts must be run in separate processes as most of them start
and stop the Java virtual machine, which can only be done once per
process. This is why simply calling pyTest (with `python -m pytest... | 36 | 76 | 0.636525 |
024c8b636c73803ba5c14b996265676bb94e1dd0 | 592 | py | Python | notebooks/shared/ipypublish/export_plugins/html_standard.py | leonbett/debuggingbook | ae1fa940c306160429232fbc93a7a7f14b44efb7 | [
"MIT"
] | 728 | 2018-09-21T03:51:04.000Z | 2022-03-28T09:35:04.000Z | notebooks/shared/ipypublish/export_plugins/html_standard.py | leonbett/debuggingbook | ae1fa940c306160429232fbc93a7a7f14b44efb7 | [
"MIT"
] | 103 | 2018-09-02T12:26:32.000Z | 2022-02-09T07:19:08.000Z | notebooks/shared/ipypublish/export_plugins/html_standard.py | leonbett/debuggingbook | ae1fa940c306160429232fbc93a7a7f14b44efb7 | [
"MIT"
] | 157 | 2018-09-02T08:00:50.000Z | 2022-03-27T22:04:50.000Z | #!/usr/bin/env python
"""html in standard nbconvert format
"""
from ipypublish.html.create_tpl import create_tpl
from ipypublish.html.standard import content
from ipypublish.html.standard import content_tagging
from ipypublish.html.standard import document
from ipypublish.html.standard import inout_prompt
from ipypubl... | 28.190476 | 52 | 0.802365 |
024cdbf14b841e1da6f77d24cda6ea8444019523 | 1,320 | py | Python | application/src/app_pkg/routes/get_messages.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | null | null | null | application/src/app_pkg/routes/get_messages.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | 3 | 2021-06-08T21:39:12.000Z | 2022-01-13T02:46:20.000Z | application/src/app_pkg/routes/get_messages.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | 1 | 2021-05-09T21:01:28.000Z | 2021-05-09T21:01:28.000Z | # from flask import render_template, request, make_response, jsonify
# from src.app_pkg.routes.common import validate_helper
# from src.app_pkg import app, db
# from src.app_pkg.forms import MessageForm
#
# ################################################
# # Show All Messages / User Profile #
# ###########... | 37.714286 | 106 | 0.641667 |
024d5f02a7be6e61357ca017fedc52a6ef5e46ea | 18,681 | py | Python | tests/fixtures/test_product.py | oldarmyc/cap | 2e3e4b89d3d05f03876446d6f339167bd2805ea8 | [
"Apache-2.0"
] | 1 | 2017-12-13T20:19:29.000Z | 2017-12-13T20:19:29.000Z | tests/fixtures/test_product.py | oldarmyc/cap | 2e3e4b89d3d05f03876446d6f339167bd2805ea8 | [
"Apache-2.0"
] | null | null | null | tests/fixtures/test_product.py | oldarmyc/cap | 2e3e4b89d3d05f03876446d6f339167bd2805ea8 | [
"Apache-2.0"
] | 1 | 2018-09-21T15:26:42.000Z | 2018-09-21T15:26:42.000Z | # Copyright 2016 Dave Kludt
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 26.018106 | 79 | 0.429849 |
0251012874a85c99ece694f4c087c35e3ad1cb49 | 2,150 | py | Python | script/download_pretrained.py | cttsai1985/google-quest-qa-labeling-pipeline | ef4fb92c470e45c0a07b0ee0e474224d88d3d410 | [
"Apache-2.0"
] | 2 | 2020-04-08T17:05:01.000Z | 2020-06-30T18:02:03.000Z | script/download_pretrained.py | cttsai1985/google-quest-qa-labeling-pipeline | ef4fb92c470e45c0a07b0ee0e474224d88d3d410 | [
"Apache-2.0"
] | null | null | null | script/download_pretrained.py | cttsai1985/google-quest-qa-labeling-pipeline | ef4fb92c470e45c0a07b0ee0e474224d88d3d410 | [
"Apache-2.0"
] | null | null | null | """
fork THIS excellent downloader
https://www.kaggle.com/maroberti/transformers-model-downloader-pytorch-tf2-0
"""
from typing import Union
from pathlib import Path
import os
import transformers
from transformers import AutoConfig, AutoTokenizer, TFAutoModel
if "__main__" == __name__:
main()
| 28.289474 | 120 | 0.693953 |
0251ffe3075d234371ce4b6df85d16a4d7b3e648 | 28,128 | py | Python | scripts/icdcs2019/communication.py | HKBU-HPML/gtopkssgd | 6f57343f3749939b0345d36fcb2c24470942aefd | [
"Apache-2.0"
] | 33 | 2019-05-13T12:04:15.000Z | 2022-03-14T06:23:56.000Z | scripts/icdcs2019/communication.py | HKBU-HPML/gtopkssgd | 6f57343f3749939b0345d36fcb2c24470942aefd | [
"Apache-2.0"
] | 2 | 2019-04-24T02:38:07.000Z | 2021-05-31T11:22:24.000Z | scripts/icdcs2019/communication.py | HKBU-HPML/gtopkssgd | 6f57343f3749939b0345d36fcb2c24470942aefd | [
"Apache-2.0"
] | 10 | 2019-07-18T23:43:32.000Z | 2021-06-16T13:22:04.000Z | from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
from utils import read_log, plot_hist, update_fontsize, autolabel, read_p100_log
from plot_sth import Bar
import os
import plot_sth as Color
import math
OUTPUT_PATH = '/media/sf_Shared_Data/tmp/icdcs2019'
INPUT_PATH = '/media/sf_S... | 38.478796 | 141 | 0.581342 |
02527978354f0193255cdacc1cd11fc9125db75e | 2,188 | py | Python | app/routers/post.py | thiere18/fastapi-boilerplate | 6760e0e49caa915563d44897262d493b012207c0 | [
"MIT"
] | 5 | 2021-12-10T17:35:31.000Z | 2021-12-30T18:36:23.000Z | app/routers/post.py | thiere18/fastapi-boilerplate | 6760e0e49caa915563d44897262d493b012207c0 | [
"MIT"
] | 1 | 2021-11-21T13:59:03.000Z | 2021-11-21T13:59:03.000Z | app/routers/post.py | thiere18/fastapi-boilerplate | 6760e0e49caa915563d44897262d493b012207c0 | [
"MIT"
] | 1 | 2021-12-07T14:08:12.000Z | 2021-12-07T14:08:12.000Z | from logging import raiseExceptions
from typing import List
from fastapi import APIRouter,Depends,HTTPException, Response,status
from sqlalchemy.orm.session import Session
from .. database import get_db
from .. import models,schemas ,oauth2
router=APIRouter(
prefix='/posts',
tags=['Post']
) | 39.781818 | 137 | 0.743601 |
0252f8eedc296b4ab429a47459f42ba29b283dbc | 8,766 | py | Python | src/util.py | thanhnhan311201/via-line-detection | 1ba986110f7522df1b82c2cdeacd5c8bc27ac896 | [
"Unlicense"
] | null | null | null | src/util.py | thanhnhan311201/via-line-detection | 1ba986110f7522df1b82c2cdeacd5c8bc27ac896 | [
"Unlicense"
] | null | null | null | src/util.py | thanhnhan311201/via-line-detection | 1ba986110f7522df1b82c2cdeacd5c8bc27ac896 | [
"Unlicense"
] | null | null | null | import torch.nn as nn
import cv2
import torch
from copy import deepcopy
import numpy as np
from torch.autograd import Variable
from torch.autograd import Function as F
from numpy.polynomial import Polynomial as P
try:
from parameters import Parameters
except:
from src.parameters import Parameters
import math... | 27.828571 | 98 | 0.544832 |
0253374b375e14e18b7b22c7b40e9e638b1ad7cf | 3,322 | py | Python | src/tests/unit_tests/io_tools_test.py | samueljackson92/major-project | 5d82b875944fcf1f001f9beb5e5419ba60be3bf1 | [
"MIT"
] | 8 | 2015-01-26T16:23:29.000Z | 2020-03-17T00:57:42.000Z | src/tests/unit_tests/io_tools_test.py | samueljackson92/major-project | 5d82b875944fcf1f001f9beb5e5419ba60be3bf1 | [
"MIT"
] | 64 | 2015-02-05T06:34:56.000Z | 2015-05-03T15:46:49.000Z | src/tests/unit_tests/io_tools_test.py | samueljackson92/major-project | 5d82b875944fcf1f001f9beb5e5419ba60be3bf1 | [
"MIT"
] | null | null | null | import nose.tools
import unittest
import os
import json
import pandas as pd
import numpy as np
import mia
from mia.io_tools import *
from ..test_utils import get_file_path
| 35.340426 | 81 | 0.669175 |
0254feaa1c998dfb2faf7f35247b0cc22066d85a | 326 | py | Python | main/migrations_old/0007_remove_profile_rated_recipes.py | ggetzie/nnr | a8b1b1d771027edee2c19062f39fa982cfd024b0 | [
"MIT"
] | null | null | null | main/migrations_old/0007_remove_profile_rated_recipes.py | ggetzie/nnr | a8b1b1d771027edee2c19062f39fa982cfd024b0 | [
"MIT"
] | 5 | 2020-07-28T12:41:50.000Z | 2022-01-21T23:27:15.000Z | main/migrations_old/0007_remove_profile_rated_recipes.py | ggetzie/nnr | a8b1b1d771027edee2c19062f39fa982cfd024b0 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-09-29 13:12
from django.db import migrations
| 18.111111 | 47 | 0.588957 |
0255255ddce0aede915e8004ff48e8619c540430 | 126 | py | Python | src/timber_clay_hybrid/assembly/__init__.py | augmentedfabricationlab/Timber_Clay_Hybrid | 243efddac77970c989b551697a0e188932064849 | [
"MIT"
] | 1 | 2020-12-16T01:25:07.000Z | 2020-12-16T01:25:07.000Z | src/timber_clay_hybrid/assembly/__init__.py | augmentedfabricationlab/timber_clay_hybrid | 243efddac77970c989b551697a0e188932064849 | [
"MIT"
] | null | null | null | src/timber_clay_hybrid/assembly/__init__.py | augmentedfabricationlab/timber_clay_hybrid | 243efddac77970c989b551697a0e188932064849 | [
"MIT"
] | null | null | null | from .assembly import HRCAssembly
from .element import HRCElement
from .artist import AssemblyArtist
from .utilities import *
| 25.2 | 34 | 0.833333 |
025829c61e2b13a8ebf606a7afdd54a016dd8119 | 3,674 | py | Python | backend/api/tests/schema/test_newsletter.py | pauloxnet/pycon | 82b6eff76dcc785865ea3ffd97a45e931c0add26 | [
"MIT"
] | 2 | 2017-07-18T21:51:25.000Z | 2017-12-23T11:08:39.000Z | backend/api/tests/schema/test_newsletter.py | pauloxnet/pycon | 82b6eff76dcc785865ea3ffd97a45e931c0add26 | [
"MIT"
] | 23 | 2017-07-18T20:22:38.000Z | 2018-01-05T05:45:15.000Z | backend/api/tests/schema/test_newsletter.py | pauloxnet/pycon | 82b6eff76dcc785865ea3ffd97a45e931c0add26 | [
"MIT"
] | 2 | 2017-07-18T21:27:33.000Z | 2017-07-18T22:07:03.000Z | from unittest.mock import patch
import pytest
from pytest import mark
from integrations.mailchimp import SubscriptionResult
from newsletters.models import Subscription
| 27.833333 | 78 | 0.617583 |
02591832a76c44befd1384a4984c9e645f451a38 | 3,077 | py | Python | conference_lib/confemailrecipients.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | conference_lib/confemailrecipients.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | 1 | 2020-02-05T13:00:29.000Z | 2020-02-05T13:00:29.000Z | conference_lib/confemailrecipients.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | #-----------------------------------------------------
# Mimas: conference submission and review system
# (c) Allan Kelly 2016-2020 http://www.allankelly.net
# Licensed under MIT License, see LICENSE file
# -----------------------------------------------------
# System imports
# Google imports
from google.appengine.e... | 40.486842 | 109 | 0.653559 |
0259184a3f3d6c2f7159bf04b270b9b14a650178 | 891 | py | Python | jexam/argparser.py | chrispyles/jexam | ebe83b170f51c5820e0c93955824c3798922f097 | [
"BSD-3-Clause"
] | 1 | 2020-07-25T02:36:38.000Z | 2020-07-25T02:36:38.000Z | jexam/argparser.py | chrispyles/jexam | ebe83b170f51c5820e0c93955824c3798922f097 | [
"BSD-3-Clause"
] | null | null | null | jexam/argparser.py | chrispyles/jexam | ebe83b170f51c5820e0c93955824c3798922f097 | [
"BSD-3-Clause"
] | null | null | null | #################################
##### jExam Argument Parser #####
#################################
import argparse
def get_parser():
"""
Creates and returns the argument parser for jExam
Returns:
``argparse.ArgumentParser``: the argument parser for jExam
"""
parser = argparse.Argum... | 42.428571 | 119 | 0.628507 |
0259bea6f07ec94194968114adbb7688e3c79035 | 236 | py | Python | basic/Pyshop/products/models.py | IsAlbertLiu/Python-basics | 49c0c93fb7d1abb70548854b69346eb5837ba00d | [
"MIT"
] | null | null | null | basic/Pyshop/products/models.py | IsAlbertLiu/Python-basics | 49c0c93fb7d1abb70548854b69346eb5837ba00d | [
"MIT"
] | null | null | null | basic/Pyshop/products/models.py | IsAlbertLiu/Python-basics | 49c0c93fb7d1abb70548854b69346eb5837ba00d | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
| 23.6 | 43 | 0.724576 |
0259fbe373b86b3d2859b384b23af03bfb7c829a | 758 | py | Python | examples/delta_setitem/001_check_setitem.py | pkicsiny/xpart | cddf3eb65ffc198c22dd37204139ce3177a9bd96 | [
"MIT"
] | null | null | null | examples/delta_setitem/001_check_setitem.py | pkicsiny/xpart | cddf3eb65ffc198c22dd37204139ce3177a9bd96 | [
"MIT"
] | null | null | null | examples/delta_setitem/001_check_setitem.py | pkicsiny/xpart | cddf3eb65ffc198c22dd37204139ce3177a9bd96 | [
"MIT"
] | null | null | null | import numpy as np
import xpart as xp
import xobjects as xo
#context = xo.ContextPyopencl()
context = xo.ContextCpu()
ctx2np = context.nparray_from_context_array
particles = xp.Particles(_context=context, p0c=26e9, delta=[1,2,3])
assert ctx2np(particles.delta[2]) == 3
assert np.isclose(ctx2np(particles.rvv[2]), 1.00... | 32.956522 | 82 | 0.726913 |
025a143f5cc2381ed79e2e47f4c56370b64d62d8 | 9,628 | py | Python | tests/test_train_eval_mode.py | glmcdona/stable-baselines3-contrib | 91f9b1ed34fbaa9243a044ea67aa4c677663bfc2 | [
"MIT"
] | 93 | 2020-10-22T14:44:58.000Z | 2022-03-25T20:06:47.000Z | tests/test_train_eval_mode.py | glmcdona/stable-baselines3-contrib | 91f9b1ed34fbaa9243a044ea67aa4c677663bfc2 | [
"MIT"
] | 36 | 2020-10-26T11:13:23.000Z | 2022-03-31T15:11:05.000Z | tests/test_train_eval_mode.py | glmcdona/stable-baselines3-contrib | 91f9b1ed34fbaa9243a044ea67aa4c677663bfc2 | [
"MIT"
] | 50 | 2020-12-06T14:21:10.000Z | 2022-03-31T14:25:36.000Z | from typing import Union
import gym
import numpy as np
import pytest
import torch as th
import torch.nn as nn
from stable_baselines3.common.preprocessing import get_flattened_obs_dim
from stable_baselines3.common.torch_layers import BaseFeaturesExtractor
from sb3_contrib import QRDQN, TQC, MaskablePPO
from sb3_contri... | 35.791822 | 125 | 0.745015 |
025a4cb24f7a49faae7c43b7347971470e80c885 | 880 | py | Python | test_harness.py | alexk307/server-exercise | 31c76a3b370334a22787e06b4c28f8c65f4dd4ff | [
"Apache-2.0"
] | null | null | null | test_harness.py | alexk307/server-exercise | 31c76a3b370334a22787e06b4c28f8c65f4dd4ff | [
"Apache-2.0"
] | null | null | null | test_harness.py | alexk307/server-exercise | 31c76a3b370334a22787e06b4c28f8c65f4dd4ff | [
"Apache-2.0"
] | null | null | null | from requests import post
from random import randrange
from uuid import uuid4
import base64
import json
PORT = 6789
MAX_SIZE_UDP = 65535
HEADER_SIZE = 12
NUM_TRANSACTIONS = 10
SERVER = 'http://localhost:1234/add'
if __name__ == '__main__':
main()
| 22 | 69 | 0.582955 |
025c24bac13de507908c7c75d29225711dbc0aef | 2,414 | py | Python | checkmate_comp/experiments/table_approx_speedup_ratios.py | uwsampl/dtr-prototype | eff53cc4804cc7d6246a6e5086861ce2b846f62b | [
"Linux-OpenIB"
] | 90 | 2020-06-18T05:32:06.000Z | 2022-03-28T13:05:17.000Z | checkmate_comp/experiments/table_approx_speedup_ratios.py | merrymercy/dtr-prototype | bf40e182453a7d8d23581ea68f32a9d7d2037d62 | [
"Linux-OpenIB"
] | 5 | 2020-07-02T02:25:16.000Z | 2022-03-24T05:50:30.000Z | checkmate_comp/experiments/table_approx_speedup_ratios.py | uwsampl/dtr-prototype | eff53cc4804cc7d6246a6e5086861ce2b846f62b | [
"Linux-OpenIB"
] | 13 | 2020-06-27T07:01:54.000Z | 2022-01-18T07:31:01.000Z | from experiments.common.definitions import remat_data_dir
import numpy as np
import pandas as pd
import glob
import re
# compute aggregated tables of max and geomean lp approximation ratios
exp_name_re = re.compile(r"^(?P<platform>.+?)_(?P<model_name>.+?)_(?P<batch_size>[0-9]+?)_(?P<input_shape>None|.+?)$")
dfs = []
... | 47.333333 | 223 | 0.67937 |
025c491da627375770263331eb452c03d4b317b0 | 431 | py | Python | src/terra/contracts/levana.py | fentas/staketaxcsv | ad37a32d8864111dbf88e926b80eb4ccacb921c6 | [
"MIT"
] | null | null | null | src/terra/contracts/levana.py | fentas/staketaxcsv | ad37a32d8864111dbf88e926b80eb4ccacb921c6 | [
"MIT"
] | null | null | null | src/terra/contracts/levana.py | fentas/staketaxcsv | ad37a32d8864111dbf88e926b80eb4ccacb921c6 | [
"MIT"
] | null | null | null | # known contracts from protocol
CONTRACTS = [
# NFT - Meteor Dust
"terra1p70x7jkqhf37qa7qm4v23g4u4g8ka4ktxudxa7",
# NFT - Eggs
"terra1k0y373yxqne22pc9g7jvnr4qclpsxtafevtrpg",
# NFT - Dragons
"terra1vhuyuwwr4rkdpez5f5lmuqavut28h5dt29rpn6",
# NFT - Loot
"terra14gfnxnwl0yz6njzet4n33erq5n70w... | 26.9375 | 51 | 0.723898 |
025c55086785bd2358aa07697fa9e5ff75a7e9fe | 2,268 | py | Python | github/migrations/0007_auto_20201003_1239.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | github/migrations/0007_auto_20201003_1239.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | github/migrations/0007_auto_20201003_1239.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-03 12:39
from django.db import migrations, models
import django.utils.timezone
| 29.076923 | 74 | 0.543651 |
025c8c73c3dda45b9c81e36fafb6a8137598b6d5 | 254 | py | Python | tests/unit/test_databeardb.py | chrisrycx/pyDataLogger | 21094da9de54ab467519a26680247ddc3efa6696 | [
"MIT"
] | 1 | 2020-09-25T16:25:09.000Z | 2020-09-25T16:25:09.000Z | tests/unit/test_databeardb.py | chrisrycx/pyDataLogger | 21094da9de54ab467519a26680247ddc3efa6696 | [
"MIT"
] | 4 | 2020-10-06T17:16:58.000Z | 2020-12-18T17:06:16.000Z | tests/unit/test_databeardb.py | chrisrycx/pyDataLogger | 21094da9de54ab467519a26680247ddc3efa6696 | [
"MIT"
] | 2 | 2020-03-24T14:32:29.000Z | 2020-08-05T17:38:24.000Z | '''
A unit test for databearDB.py
Runs manually at this point...
'''
import unittest
from databear.databearDB import DataBearDB
#Tests
| 14.111111 | 42 | 0.622047 |
025ca2353166896f2415d32f2b2cf83266307837 | 19 | py | Python | dbt/adapters/athena/__version__.py | sacundim/dbt-athena | 120c9d3c88da98ec11ddfcf0a0a3fda49538f197 | [
"Apache-2.0"
] | 92 | 2019-03-23T07:23:55.000Z | 2021-06-15T18:18:32.000Z | dbt/adapters/athena/__version__.py | sacundim/dbt-athena | 120c9d3c88da98ec11ddfcf0a0a3fda49538f197 | [
"Apache-2.0"
] | 156 | 2019-03-21T03:26:58.000Z | 2021-06-29T15:30:51.000Z | dbt/adapters/athena/__version__.py | sacundim/dbt-athena | 120c9d3c88da98ec11ddfcf0a0a3fda49538f197 | [
"Apache-2.0"
] | 58 | 2019-04-12T09:09:43.000Z | 2021-06-24T15:25:11.000Z | version = "0.21.0"
| 9.5 | 18 | 0.578947 |
025d05b924cc7305e801b76dce5c6ec01a360e7c | 1,161 | py | Python | dxtbx/conftest.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | dxtbx/conftest.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | dxtbx/conftest.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | #
# See https://github.com/dials/dials/wiki/pytest for documentation on how to
# write and run pytest tests, and an overview of the available features.
#
from __future__ import absolute_import, division, print_function
import os
import pytest
def pytest_addoption(parser):
'''Add '--regression' options to pytest.'... | 33.171429 | 81 | 0.731266 |
025e3d2d32267b02443190a02969375302ba67a9 | 978 | py | Python | ietf/review/migrations/0020_auto_20191115_2059.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 25 | 2022-03-05T08:26:52.000Z | 2022-03-30T15:45:42.000Z | ietf/review/migrations/0020_auto_20191115_2059.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 219 | 2022-03-04T17:29:12.000Z | 2022-03-31T21:16:14.000Z | ietf/review/migrations/0020_auto_20191115_2059.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 22 | 2022-03-04T15:34:34.000Z | 2022-03-28T13:30:59.000Z | # Copyright The IETF Trust 2019-2020, All Rights Reserved
# -*- coding: utf-8 -*-
# Generated by Django 1.11.26 on 2019-11-15 20:59
from django.db import migrations, models
| 36.222222 | 231 | 0.677914 |
02618a7eed33bdfbec9b651a6841eb4fcf49a22c | 1,663 | py | Python | utils/auth.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | null | null | null | utils/auth.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | 2 | 2021-05-21T13:26:26.000Z | 2022-02-10T10:04:55.000Z | utils/auth.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from rest_framework import authentication
from rest_framework import exceptions
from notifai_recruitment import settings
| 47.514286 | 120 | 0.736019 |
02623225e5d363b265ee6e56ba38be5191b44c1f | 435 | py | Python | scripts/issues/issue6.py | slamer59/awesome-panel | 91c30bd6d6859eadf9c65b1e143952f7e64d5290 | [
"Apache-2.0"
] | 179 | 2019-12-04T14:54:53.000Z | 2022-03-30T09:08:38.000Z | scripts/issues/issue6.py | slamer59/awesome-panel | 91c30bd6d6859eadf9c65b1e143952f7e64d5290 | [
"Apache-2.0"
] | 62 | 2019-12-14T16:51:28.000Z | 2022-03-19T18:47:12.000Z | scripts/issues/issue6.py | slamer59/awesome-panel | 91c30bd6d6859eadf9c65b1e143952f7e64d5290 | [
"Apache-2.0"
] | 35 | 2019-12-08T13:19:53.000Z | 2022-03-25T10:33:02.000Z | import panel as pn
main()
| 19.772727 | 75 | 0.542529 |
02649919ebe1649e2c617d8a536cb6343e919b0b | 18,257 | py | Python | Electronic_Arts_Software_Engineering_Virtual_Program/Task_1/Vaxman_in_Python/vaxman.py | melwyncarlo/Virtual_Internship_Programmes | 1d1ae99abd63765d69ce930438c4bd6d15bd3d45 | [
"CC0-1.0"
] | null | null | null | Electronic_Arts_Software_Engineering_Virtual_Program/Task_1/Vaxman_in_Python/vaxman.py | melwyncarlo/Virtual_Internship_Programmes | 1d1ae99abd63765d69ce930438c4bd6d15bd3d45 | [
"CC0-1.0"
] | null | null | null | Electronic_Arts_Software_Engineering_Virtual_Program/Task_1/Vaxman_in_Python/vaxman.py | melwyncarlo/Virtual_Internship_Programmes | 1d1ae99abd63765d69ce930438c4bd6d15bd3d45 | [
"CC0-1.0"
] | null | null | null | # Vax-Man, a re-implementation of Pacman, in Python, with PyGame.
# Forked from: https://github.com/hbokmann/Pacman
# Edited by Melwyn Francis Carlo (2021)
# Video link: https://youtu.be/ZrqZEC6DvMc
import time
import pygame
# Ghosts multiply themselves every thirty seconds.
GHOST_MULTIPLICATION_TIME_GAP = 30
# Th... | 29.025437 | 143 | 0.570083 |
02672c292331f32c5416bda0b2eba29281a17676 | 1,320 | py | Python | examples/ecr/rl_formulations/common/state_shaper.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | examples/ecr/rl_formulations/common/state_shaper.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | examples/ecr/rl_formulations/common/state_shaper.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import numpy as np
from maro.rl import AbstractStateShaper
| 45.517241 | 117 | 0.724242 |
0267eac0bf1a3be3319a75260f8b10b9d6a39d75 | 2,834 | py | Python | src/runner.py | Shahrukh-Badar/DeepLearning | 5f6bbd6f8ace06014f10e35183442901d984b231 | [
"MIT"
] | null | null | null | src/runner.py | Shahrukh-Badar/DeepLearning | 5f6bbd6f8ace06014f10e35183442901d984b231 | [
"MIT"
] | null | null | null | src/runner.py | Shahrukh-Badar/DeepLearning | 5f6bbd6f8ace06014f10e35183442901d984b231 | [
"MIT"
] | null | null | null | from os import listdir
from os.path import join, isfile
import json
from random import randint
#########################################
## START of part that students may change
from code_completion_baseline import Code_Completion_Baseline
training_dir = "./../../programs_800/"
query_dir = "./../../programs_200/"
m... | 32.953488 | 127 | 0.650318 |
0268d3f7d9cf4572520e699a426fa385cc8944bc | 4,491 | py | Python | superhelp/formatters/cli_formatter.py | grantps/superhelp | d8e861bf1ad91571ac23b9c833a8cd461bb1952f | [
"MIT"
] | 27 | 2020-05-17T20:48:43.000Z | 2022-01-08T21:32:30.000Z | superhelp/formatters/cli_formatter.py | grantps/superhelp | d8e861bf1ad91571ac23b9c833a8cd461bb1952f | [
"MIT"
] | null | null | null | superhelp/formatters/cli_formatter.py | grantps/superhelp | d8e861bf1ad91571ac23b9c833a8cd461bb1952f | [
"MIT"
] | null | null | null | from pathlib import Path
from textwrap import dedent
from superhelp import conf
from superhelp.conf import Level, Theme
from superhelp.formatters.cli_extras import md2cli
from superhelp.formatters.cli_extras.cli_colour import set_global_colours
from superhelp.gen_utils import (get_code_desc, get_intro,
get_line_nu... | 37.115702 | 93 | 0.674905 |
0268e7698751adcedb3a0f8d62ab2e3667fd33f3 | 4,941 | py | Python | atom/instance.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | null | null | null | atom/instance.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | 1 | 2020-12-04T10:11:07.000Z | 2020-12-04T10:13:46.000Z | atom/instance.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | 1 | 2020-12-04T10:05:32.000Z | 2020-12-04T10:05:32.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
from .catom import (
Member, DEFAULT_FACTORY, DEFAULT_VALUE, USER_DEFAULT, VALIDATE_INSTANCE,... | 36.065693 | 79 | 0.608379 |
0268f15772e163a48707362a23538e64ee3c364e | 4,744 | py | Python | operators/elastic-cloud-eck/python/pulumi_pulumi_kubernetes_crds_operators_elastic_cloud_eck/_tables.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | operators/elastic-cloud-eck/python/pulumi_pulumi_kubernetes_crds_operators_elastic_cloud_eck/_tables.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | 2 | 2020-09-18T17:12:23.000Z | 2020-12-30T19:40:56.000Z | operators/elastic-cloud-eck/python/pulumi_pulumi_kubernetes_crds_operators_elastic_cloud_eck/_tables.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
SNAKE_TO_CAMEL_CASE_TABLE = {
"access_modes": "accessModes",
"api_group": "apiGroup",
"api_version": "apiVersion",
"app_protocol": "appProtocol",
... | 39.533333 | 80 | 0.707841 |
026b557b15ada072d61283c89f10a088c8637df4 | 1,416 | py | Python | webapp/app.py | aleksandergurin/news | 9e7d3c35857600445cb6df42ba18d289dc0e37a9 | [
"BSD-3-Clause"
] | 3 | 2015-08-20T11:08:28.000Z | 2018-01-28T21:22:53.000Z | webapp/app.py | aleksandergurin/news | 9e7d3c35857600445cb6df42ba18d289dc0e37a9 | [
"BSD-3-Clause"
] | null | null | null | webapp/app.py | aleksandergurin/news | 9e7d3c35857600445cb6df42ba18d289dc0e37a9 | [
"BSD-3-Clause"
] | null | null | null |
from flask import Flask, render_template
from config import configs
from .extensions import login_manager, db
from .account import account
from .frontend import frontend
from webapp.session import RedisSessionInterface
| 24.413793 | 80 | 0.711864 |
026bd83279fbac0f51bacbf47138a5022a5dd278 | 27,723 | py | Python | src/ezcode/knapsack/__init__.py | zheng-gao/ez_code | fbf48990291aa57d6436d4548b0a6c25dfb8f82d | [
"MIT"
] | null | null | null | src/ezcode/knapsack/__init__.py | zheng-gao/ez_code | fbf48990291aa57d6436d4548b0a6c25dfb8f82d | [
"MIT"
] | null | null | null | src/ezcode/knapsack/__init__.py | zheng-gao/ez_code | fbf48990291aa57d6436d4548b0a6c25dfb8f82d | [
"MIT"
] | null | null | null | from typing import Callable
| 48.046794 | 145 | 0.537171 |
026d6883b4b4ef48ca95ca7facd1d38932ace6a3 | 26 | py | Python | env/lib/python3.7/site-packages/grpc/_grpcio_metadata.py | PrudhviGNV/speechemotion | c99b4a7f644e1fd495cb5e6750ada0dd50d8b86f | [
"MIT"
] | 5 | 2019-04-16T20:43:47.000Z | 2020-10-24T22:35:39.000Z | Lib/site-packages/grpc/_grpcio_metadata.py | caiyongji/Anaconda-py36.5-tensorflow-built-env | f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2 | [
"PSF-2.0"
] | 2 | 2021-04-30T20:43:55.000Z | 2021-06-10T21:34:23.000Z | Lib/site-packages/grpc/_grpcio_metadata.py | caiyongji/Anaconda-py36.5-tensorflow-built-env | f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2 | [
"PSF-2.0"
] | 3 | 2019-08-03T13:47:09.000Z | 2021-08-03T14:20:25.000Z | __version__ = """1.19.0""" | 26 | 26 | 0.576923 |
027134b2e08ff17613c7279b030cfe1fcf0d8e8e | 309 | py | Python | pycon/tutorials/urls.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 154 | 2015-01-17T02:29:24.000Z | 2022-03-20T20:37:24.000Z | pycon/tutorials/urls.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 316 | 2015-01-10T04:01:50.000Z | 2020-09-30T20:18:08.000Z | pycon/tutorials/urls.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 89 | 2015-01-10T05:25:21.000Z | 2022-02-27T03:28:59.000Z | from django.conf.urls import url, patterns
from .views import tutorial_email, tutorial_message
urlpatterns = patterns("", # flake8: noqa
url(r"^mail/(?P<pk>\d+)/(?P<pks>[0-9,]+)/$", tutorial_email, name="tutorial_email"),
url(r"^message/(?P<pk>\d+)/$", tutorial_message, name="tutorial_message"),
)
| 34.333333 | 88 | 0.679612 |
027194484ee86822b39b3b119ff07d71c83e4daa | 895 | py | Python | setup.py | oleks/gigalixir-cli | d1b1c303e24be548ddc895165e34652c378f4347 | [
"MIT"
] | null | null | null | setup.py | oleks/gigalixir-cli | d1b1c303e24be548ddc895165e34652c378f4347 | [
"MIT"
] | null | null | null | setup.py | oleks/gigalixir-cli | d1b1c303e24be548ddc895165e34652c378f4347 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='gigalixir',
url='https://github.com/gigalixir/gigalixir-cli',
author='Jesse Shieh',
author_email='jesse@gigalixir.com',
version='1.1.10',
packages=find_packages(),
include_package_data=True,
install_requires=[
'click~=6.7'... | 20.813953 | 53 | 0.492737 |
02723743e00e16a13861c25c7c9d6a4bb4b3f93e | 254 | py | Python | runTest.py | Amedeo91/cushypost_integration | fc7ffc9daf535ed5bcfdee4933a7a57340a583b2 | [
"MIT"
] | 1 | 2021-10-06T06:23:40.000Z | 2021-10-06T06:23:40.000Z | runTest.py | Amedeo91/cushypost_integration | fc7ffc9daf535ed5bcfdee4933a7a57340a583b2 | [
"MIT"
] | null | null | null | runTest.py | Amedeo91/cushypost_integration | fc7ffc9daf535ed5bcfdee4933a7a57340a583b2 | [
"MIT"
] | null | null | null | import os
import unittest
dir_path = os.path.dirname(os.path.realpath(__file__))
suite = unittest.TestLoader().discover(dir_path, pattern='test_*.py')
result = unittest.TextTestRunner(verbosity=3).run(suite)
print(result)
assert result.wasSuccessful()
| 25.4 | 69 | 0.787402 |
02735e99efa8906c66196996cdf60aedba9354a2 | 6,145 | py | Python | tests/test_pydent/test_models/models/test_plan.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 5 | 2019-01-21T11:12:05.000Z | 2020-03-05T20:52:14.000Z | tests/test_pydent/test_models/models/test_plan.py | aquariumbio/pydent | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 28 | 2020-11-18T02:07:09.000Z | 2021-06-08T15:49:41.000Z | tests/test_pydent/test_models/models/test_plan.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 2 | 2021-02-27T19:23:45.000Z | 2021-09-14T10:29:07.000Z | import pytest
from pydent.models import Plan
def test_plan_copy(example_plan):
"""Copying plans should anonymize operations and wires."""
copied_plan = example_plan.copy()
assert copied_plan.operations
for op in copied_plan.operations:
assert op.id is None
assert op.operation_ty... | 28.581395 | 76 | 0.621318 |
0273c9fe7bf28f09a7dc46bd636570ab46c8a8fa | 611 | py | Python | FusionIIIT/applications/gymkhana/migrations/0007_auto_20200608_2210.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 2 | 2020-01-24T16:34:54.000Z | 2020-08-01T05:09:24.000Z | FusionIIIT/applications/gymkhana/migrations/0007_auto_20200608_2210.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 1 | 2021-05-05T09:50:22.000Z | 2021-05-05T09:50:22.000Z | FusionIIIT/applications/gymkhana/migrations/0007_auto_20200608_2210.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 4 | 2020-01-16T17:00:08.000Z | 2020-06-30T15:58:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-06-08 22:10
from __future__ import unicode_literals
from django.db import migrations, models
| 24.44 | 101 | 0.610475 |
027588263d8cfcf1854016d6bcb09a5b8fcae300 | 1,899 | py | Python | config/presets/Modes/Python/T - Bits H/main.py | The-XOR/EYESY_OS | 6a5e3d0bc5574ba2311e0c7e81c600c3af7a3e34 | [
"BSD-3-Clause"
] | 18 | 2021-03-06T05:39:30.000Z | 2022-03-25T17:59:23.000Z | presets/Modes/Python/T - Bits H/main.py | jqrsound/EYESY_OS_for_RasPiSound | ac117b91cd84ad4c0566bd1a7d4c7b1ccc01cf62 | [
"BSD-3-Clause"
] | null | null | null | presets/Modes/Python/T - Bits H/main.py | jqrsound/EYESY_OS_for_RasPiSound | ac117b91cd84ad4c0566bd1a7d4c7b1ccc01cf62 | [
"BSD-3-Clause"
] | 4 | 2021-03-14T18:38:42.000Z | 2021-07-11T14:31:18.000Z | import os
import pygame
import random
trigger = False
x = 0
y = 0
height = 720
width = 1280
linelength = 50
lineAmt = 20
displace = 10
xpos = [random.randrange(-200,1280) for i in range(0, lineAmt + 2)]
xpos1 = [(xpos[i]+displace) for i in range(0, lineAmt + 2)]
xr = 360
yr = 240
| 31.131148 | 97 | 0.604529 |
0275d85ad826b0b81b83f4f373f69ae66117d9ed | 2,577 | py | Python | ext/std/code/mi.py | iazarov/metrixplusplus | 322777cba4e089502dd6053749b07a7be9da65b2 | [
"MIT"
] | null | null | null | ext/std/code/mi.py | iazarov/metrixplusplus | 322777cba4e089502dd6053749b07a7be9da65b2 | [
"MIT"
] | null | null | null | ext/std/code/mi.py | iazarov/metrixplusplus | 322777cba4e089502dd6053749b07a7be9da65b2 | [
"MIT"
] | null | null | null | #
# Metrix++, Copyright 2009-2019, Metrix++ Project
# Link: https://github.com/metrixplusplus/metrixplusplus
#
# This file is a part of Metrix++ Tool.
#
import mpp.api
| 45.210526 | 100 | 0.568879 |
027b51903bbc31466f05349aa598a39bb4d2919d | 447 | py | Python | 6.00.1x/quiz/flatten.py | NicholasAsimov/courses | d60981f25816445578eb9e89bbbeef2d38eaf014 | [
"MIT"
] | null | null | null | 6.00.1x/quiz/flatten.py | NicholasAsimov/courses | d60981f25816445578eb9e89bbbeef2d38eaf014 | [
"MIT"
] | null | null | null | 6.00.1x/quiz/flatten.py | NicholasAsimov/courses | d60981f25816445578eb9e89bbbeef2d38eaf014 | [
"MIT"
] | null | null | null | def flatten(aList):
'''
aList: a list
Returns a copy of aList, which is a flattened version of aList
'''
if aList == []:
return aList
if type(aList[0]) == list:
return flatten(aList[0]) + flatten(aList[1:])
return aList[:1] + flatten(aList[1:])
aList = [[1, 'a', ['cat'], 2... | 22.35 | 66 | 0.548098 |
027cdd147516550681b095c7591faaa5e2b26a2b | 9,960 | py | Python | copo_code/copo/algo_svo/svo_env.py | decisionforce/CoPO | 3a06a48522b901db2e380a62a0efb5e8a30cd079 | [
"Apache-2.0"
] | 37 | 2021-11-01T03:30:30.000Z | 2022-03-29T08:38:12.000Z | copo_code/copo/algo_svo/svo_env.py | decisionforce/CoPO | 3a06a48522b901db2e380a62a0efb5e8a30cd079 | [
"Apache-2.0"
] | null | null | null | copo_code/copo/algo_svo/svo_env.py | decisionforce/CoPO | 3a06a48522b901db2e380a62a0efb5e8a30cd079 | [
"Apache-2.0"
] | 4 | 2021-11-05T06:55:34.000Z | 2022-01-04T07:08:37.000Z | """
Usage: Call get_svo_env(env_class) to get the real env class!
"""
from collections import defaultdict
from math import cos, sin
import numpy as np
from gym.spaces import Box
from metadrive.envs.marl_envs.marl_tollgate import TollGateObservation, MultiAgentTollgateEnv
from metadrive.obs.state_obs import LidarStateO... | 35.44484 | 113 | 0.570482 |
027d3d4607b5f1e18cfb2663664c754672a047c8 | 1,995 | py | Python | tests/test_renderer.py | derlin/get-html | ea6d81f424ed0a60a37a52b95dd5b27c85cf0852 | [
"Apache-2.0"
] | 11 | 2020-03-02T08:38:37.000Z | 2021-11-19T05:03:20.000Z | tests/test_renderer.py | derlin/get-html | ea6d81f424ed0a60a37a52b95dd5b27c85cf0852 | [
"Apache-2.0"
] | 2 | 2020-03-02T11:43:12.000Z | 2020-03-10T07:59:07.000Z | tests/test_renderer.py | derlin/get-html | ea6d81f424ed0a60a37a52b95dd5b27c85cf0852 | [
"Apache-2.0"
] | 2 | 2020-03-02T08:13:53.000Z | 2020-03-09T21:15:26.000Z | from get_html.html_renderer import HtmlRenderer
import pytest
import re
| 32.704918 | 148 | 0.680201 |
027e6a3b136fbe978f346957d7b86c2022fa6ea2 | 724 | py | Python | resources/include-lists/string_manipulator_util.py | e-loughlin/CppCodeGenerator | 638f80f9df21d709d1240bb3bd43f9d43dd2e3ac | [
"MIT"
] | 6 | 2019-09-30T10:27:15.000Z | 2020-12-20T14:46:24.000Z | resources/include-lists/string_manipulator_util.py | e-loughlin/CppCodeGenerator | 638f80f9df21d709d1240bb3bd43f9d43dd2e3ac | [
"MIT"
] | 4 | 2019-11-25T18:14:29.000Z | 2019-12-09T20:47:29.000Z | resources/include-lists/string_manipulator_util.py | emloughl/CppCodeGenerator | 638f80f9df21d709d1240bb3bd43f9d43dd2e3ac | [
"MIT"
] | 1 | 2021-12-01T07:03:31.000Z | 2021-12-01T07:03:31.000Z |
import sys
import os
import ntpath
if __name__ == "__main__":
main()
| 20.111111 | 53 | 0.574586 |
027e798c00ba61f438e908e5871d0e08cf7a12f8 | 2,205 | py | Python | build/lib/henmedlib/functions/hounsfield.py | schmitzhenninglmu/henmedlib | 196b63710f092470ab21173cfcc0b14e65778f33 | [
"MIT"
] | null | null | null | build/lib/henmedlib/functions/hounsfield.py | schmitzhenninglmu/henmedlib | 196b63710f092470ab21173cfcc0b14e65778f33 | [
"MIT"
] | null | null | null | build/lib/henmedlib/functions/hounsfield.py | schmitzhenninglmu/henmedlib | 196b63710f092470ab21173cfcc0b14e65778f33 | [
"MIT"
] | 1 | 2019-09-20T10:59:25.000Z | 2019-09-20T10:59:25.000Z | __author__ = "Henning Schmitz"
import numpy as np
def calculate_hounsfield_unit(mu, mu_water, mu_air):
"""
Given linear attenuation coefficients the function calculates the corresponding Hounsfield units.
:param mu: Attenuation coefficient to determine corresponding Hounsfield unit.
:param mu_... | 38.017241 | 116 | 0.677098 |
027ff59d51aedead00128b3b38fec073cc323ee3 | 1,028 | py | Python | coaddExtract.py | rbliu/LSST_DM_Scripts | 0a32ba629a2b52d3add407e92ab8ff4bc3cbd64d | [
"MIT"
] | null | null | null | coaddExtract.py | rbliu/LSST_DM_Scripts | 0a32ba629a2b52d3add407e92ab8ff4bc3cbd64d | [
"MIT"
] | null | null | null | coaddExtract.py | rbliu/LSST_DM_Scripts | 0a32ba629a2b52d3add407e92ab8ff4bc3cbd64d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
## last modified by Robert Liu at 7/29/2019
## This script is used to extract data (and WCS info) in the image extension of a coadd patch.
## Ext 0 = primaryHDU, Ext 1 = image, Ext 2 = mask, Ext 3 = variancce.
## Then, the output fits file can be used by SWarp to assemble a... | 28.555556 | 94 | 0.715953 |
02824286d75d00e50642afe49b18a9fd9681523d | 22 | py | Python | backend_server/backend_globals.py | MSNLAB/SmartEye | 40b38190aeff5d5b970c8cbf43e8781634b38028 | [
"MIT",
"Unlicense"
] | 17 | 2021-06-27T04:33:13.000Z | 2022-03-21T02:54:52.000Z | backend_server/backend_globals.py | MSNLAB/SmartEye | 40b38190aeff5d5b970c8cbf43e8781634b38028 | [
"MIT",
"Unlicense"
] | null | null | null | backend_server/backend_globals.py | MSNLAB/SmartEye | 40b38190aeff5d5b970c8cbf43e8781634b38028 | [
"MIT",
"Unlicense"
] | 2 | 2021-10-31T05:14:24.000Z | 2022-03-25T18:53:49.000Z |
global loaded_model
| 5.5 | 19 | 0.818182 |
02842784fc821e743357ee9efac57212bf1f6827 | 326 | py | Python | src/utils.py | fabiob/wwwsqldesigner-aws | 5518eae682e8228be30b094c6015054b3cddf8f3 | [
"MIT"
] | null | null | null | src/utils.py | fabiob/wwwsqldesigner-aws | 5518eae682e8228be30b094c6015054b3cddf8f3 | [
"MIT"
] | null | null | null | src/utils.py | fabiob/wwwsqldesigner-aws | 5518eae682e8228be30b094c6015054b3cddf8f3 | [
"MIT"
] | 1 | 2021-04-04T09:41:51.000Z | 2021-04-04T09:41:51.000Z | from .env import S3_PREFIX
| 20.375 | 64 | 0.650307 |
028456bd34d14ef1d7f23ca7f443c4b9f0404a35 | 4,071 | py | Python | waferscreen/inst_control/inactive/agilent_34970A.py | chw3k5/WaferScreen | c0ca7fe939fe7cd0b722b7d6129b148c03a7505c | [
"Apache-2.0"
] | 1 | 2021-07-30T19:06:07.000Z | 2021-07-30T19:06:07.000Z | waferscreen/inst_control/inactive/agilent_34970A.py | chw3k5/WaferScreen | c0ca7fe939fe7cd0b722b7d6129b148c03a7505c | [
"Apache-2.0"
] | 8 | 2021-04-22T20:47:48.000Z | 2021-07-30T19:06:01.000Z | waferscreen/inst_control/inactive/agilent_34970A.py | chw3k5/WaferScreen | c0ca7fe939fe7cd0b722b7d6129b148c03a7505c | [
"Apache-2.0"
] | null | null | null | import serial
| 39.911765 | 119 | 0.503316 |
0285c8a2ee84e232d1b5d465f4047d255ab9153e | 2,318 | py | Python | force_wfmanager/gui/tests/test_click_run.py | force-h2020/force-wfmanager | bcd488cd37092cacd9d0c81b544ee8c1654d1d92 | [
"BSD-2-Clause"
] | 1 | 2019-08-19T16:02:20.000Z | 2019-08-19T16:02:20.000Z | force_wfmanager/gui/tests/test_click_run.py | force-h2020/force-wfmanager | bcd488cd37092cacd9d0c81b544ee8c1654d1d92 | [
"BSD-2-Clause"
] | 396 | 2017-07-18T15:19:55.000Z | 2021-05-03T06:23:06.000Z | force_wfmanager/gui/tests/test_click_run.py | force-h2020/force-wfmanager | bcd488cd37092cacd9d0c81b544ee8c1654d1d92 | [
"BSD-2-Clause"
] | 2 | 2019-03-05T16:23:10.000Z | 2020-04-16T08:59:11.000Z | # (C) Copyright 2010-2020 Enthought, Inc., Austin, TX
# All rights reserved.
import unittest
import sys
import os
from unittest import mock
from click.testing import CliRunner
import force_wfmanager.gui.run
from force_wfmanager.tests.dummy_classes.dummy_wfmanager import \
DummyWfManager
from force_wfmanager.ve... | 34.088235 | 74 | 0.615617 |
0286818653d925685a7dbe2ea01784b7a5521b18 | 675 | py | Python | menu.py | shaolinbertrand/RPG | 77292c54baa14baf9e09d036be67592bb8f2c093 | [
"MIT"
] | null | null | null | menu.py | shaolinbertrand/RPG | 77292c54baa14baf9e09d036be67592bb8f2c093 | [
"MIT"
] | null | null | null | menu.py | shaolinbertrand/RPG | 77292c54baa14baf9e09d036be67592bb8f2c093 | [
"MIT"
] | null | null | null | from cadastrarJogador import cadastra_jogador
from cadastrarMonstros import cadastra_monstro
from atualizaJogador import atualiza
from combate import combate_iniciado
while True:
print('Bem vindo ao RPG selecione a opo desenjada')
print('[0] - Cadastrar Novo Jogador\n[1] - Atualizar Jogador\n[2] - Cadastrar Nov... | 33.75 | 138 | 0.665185 |
02869a45220bc3cd768ae9f192b46417fa96c690 | 4,354 | py | Python | plugin_manager/accounts/models.py | ahharu/plugin-manager | 43d5e2c6e25ed8f50eedf7fd876fbc04f75d94bb | [
"MIT"
] | null | null | null | plugin_manager/accounts/models.py | ahharu/plugin-manager | 43d5e2c6e25ed8f50eedf7fd876fbc04f75d94bb | [
"MIT"
] | null | null | null | plugin_manager/accounts/models.py | ahharu/plugin-manager | 43d5e2c6e25ed8f50eedf7fd876fbc04f75d94bb | [
"MIT"
] | null | null | null | """
Custom user model for deployments.
"""
import urllib
import hashlib
import base64
import random
from authtools.models import AbstractEmailUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save
from .managers import DeployUserManage... | 29.221477 | 78 | 0.595315 |
02871af56c42a72cf7ba11b3dac2fc5de68923f2 | 1,007 | py | Python | heads/fc1024_normalize.py | ahmdtaha/tf_retrieval_baseline | 31b1588f888cecc1d4287f77bd046314956482d5 | [
"Apache-2.0"
] | 37 | 2019-06-01T02:11:48.000Z | 2021-12-31T06:27:42.000Z | heads/fc1024_normalize.py | ahmdtaha/tf_retrieval_baseline | 31b1588f888cecc1d4287f77bd046314956482d5 | [
"Apache-2.0"
] | 1 | 2019-06-21T03:20:59.000Z | 2019-09-03T14:20:04.000Z | heads/fc1024_normalize.py | ahmdtaha/tf_retrieval_baseline | 31b1588f888cecc1d4287f77bd046314956482d5 | [
"Apache-2.0"
] | 6 | 2019-10-11T10:21:56.000Z | 2022-03-09T06:22:57.000Z | import tensorflow as tf
from tensorflow.contrib import slim
| 33.566667 | 105 | 0.675273 |
02875f5951726e518af5547e018727a57f4c2846 | 1,144 | py | Python | vendor/github.com/elastic/beats/topbeat/tests/system/test_base.py | ninjasftw/libertyproxybeat | b8acafe86ad285f091bf69b59d2ebd1da80dcf5e | [
"Apache-2.0"
] | 37 | 2016-01-25T10:52:59.000Z | 2021-05-08T11:44:39.000Z | vendor/github.com/elastic/beats/topbeat/tests/system/test_base.py | ninjasftw/libertyproxybeat | b8acafe86ad285f091bf69b59d2ebd1da80dcf5e | [
"Apache-2.0"
] | 35 | 2016-01-25T09:19:28.000Z | 2017-11-20T23:29:35.000Z | vendor/github.com/elastic/beats/topbeat/tests/system/test_base.py | ninjasftw/libertyproxybeat | b8acafe86ad285f091bf69b59d2ebd1da80dcf5e | [
"Apache-2.0"
] | 23 | 2016-01-25T09:15:05.000Z | 2020-12-14T06:08:31.000Z | from topbeat import BaseTest
import os
import shutil
import time
"""
Contains tests for base config
"""
| 28.6 | 79 | 0.612762 |
0289963af258cded39c2b0dcfaad0d26f59c24b0 | 7,133 | py | Python | JapanSize.py | AleksanderLidtke/XKCD | 47c5029d9737390a910184adc66efc1347b84441 | [
"MIT"
] | null | null | null | JapanSize.py | AleksanderLidtke/XKCD | 47c5029d9737390a910184adc66efc1347b84441 | [
"MIT"
] | null | null | null | JapanSize.py | AleksanderLidtke/XKCD | 47c5029d9737390a910184adc66efc1347b84441 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Throughout my travels I've discovered that most people, including myself, do not
realise many things about our Planet's size. For example, the latitude and
longitude of certain regions (South America is much further east than the US)
or the relative size of countries (Japan is surprisingly l... | 43.493902 | 91 | 0.728305 |
028a79224d1b3b0d7d2cc26a3b2408f89ff5f8c5 | 7,252 | py | Python | lstm_toyexample.py | dsriaditya999/LSTM-Toy-Example | 850f7923122b547c1fd25b3b1dc739e8c5db2570 | [
"MIT"
] | null | null | null | lstm_toyexample.py | dsriaditya999/LSTM-Toy-Example | 850f7923122b547c1fd25b3b1dc739e8c5db2570 | [
"MIT"
] | null | null | null | lstm_toyexample.py | dsriaditya999/LSTM-Toy-Example | 850f7923122b547c1fd25b3b1dc739e8c5db2570 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Importing Libraries
"""
# Commented out IPython magic to ensure Python compatibility.
import torch
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import torch.nn as nn
from tqdm import tqdm_notebook
from sklearn.preprocessing import MinMaxScaler... | 34.046948 | 212 | 0.734694 |
028b6c5908aab150cc0d4d671ccfb977919ebe32 | 22,929 | py | Python | api/chat.py | Jecosine/blivechat | d398e4913e0c76d93d3f5402938dc59ea1424ec6 | [
"MIT"
] | null | null | null | api/chat.py | Jecosine/blivechat | d398e4913e0c76d93d3f5402938dc59ea1424ec6 | [
"MIT"
] | null | null | null | api/chat.py | Jecosine/blivechat | d398e4913e0c76d93d3f5402938dc59ea1424ec6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import asyncio
import enum
import json
import logging
import random
import time
import uuid
from typing import *
import aiohttp
import tornado.websocket
import api.base
import blivedm.blivedm as blivedm
import config
import models.avatar
import models.translate
import models.log
logger = logg... | 34.019288 | 111 | 0.584326 |
65f43d030f26c2fcb657f044a4435543df49146f | 954 | py | Python | gan.py | AtlantixJJ/LBSGAN | e91d500d4a9c02dd5e3bfcbd9a9eca96dc60102a | [
"BSD-2-Clause"
] | 1 | 2019-06-09T02:43:35.000Z | 2019-06-09T02:43:35.000Z | gan.py | AtlantixJJ/LBSGAN | e91d500d4a9c02dd5e3bfcbd9a9eca96dc60102a | [
"BSD-2-Clause"
] | null | null | null | gan.py | AtlantixJJ/LBSGAN | e91d500d4a9c02dd5e3bfcbd9a9eca96dc60102a | [
"BSD-2-Clause"
] | null | null | null | import argparse
import os
import sys
import time
import torch
import torch.nn.functional as F
import torchvision
import models, lib
cfg = lib.config.BaseConfig()
cfg.parse()
print('Preparing model')
gen_model = cfg.gen_function(
upsample=cfg.upsample,
map_size=cfg.map_size,
out_dim=cfg.out_dim)
disc_model... | 24.461538 | 111 | 0.765199 |
65f47a4c6cbf9c3cbfef8996d91a66023d1ce4f0 | 1,475 | py | Python | leetcode/minimumAreaRectangle.py | federicoemartinez/problem_solving | d0352f76bc21ed67d6851a159a00f70a892934b9 | [
"MIT"
] | null | null | null | leetcode/minimumAreaRectangle.py | federicoemartinez/problem_solving | d0352f76bc21ed67d6851a159a00f70a892934b9 | [
"MIT"
] | null | null | null | leetcode/minimumAreaRectangle.py | federicoemartinez/problem_solving | d0352f76bc21ed67d6851a159a00f70a892934b9 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/minimum-area-rectangle/description/
"""
Given a set of points in the xy-plane, determine the minimum area of a rectangle formed from these points, with sides parallel to the x and y axes.
If there isn't any rectangle, return 0.
Example 1:
Input: [[1,1],[1,3],[3,1],[3,3],[2,2]]
Outp... | 27.314815 | 147 | 0.553898 |
65f96718aa17ce886b225fbdf113223d6df0b594 | 3,002 | py | Python | code/google_sheet_writing.py | BastinFlorian/BoondManager-Auto-Holidays-Validation | 28ae01d997132745018666952829771d5f8d99a3 | [
"MIT"
] | null | null | null | code/google_sheet_writing.py | BastinFlorian/BoondManager-Auto-Holidays-Validation | 28ae01d997132745018666952829771d5f8d99a3 | [
"MIT"
] | 18 | 2020-03-24T17:24:10.000Z | 2022-03-12T00:29:56.000Z | code/google_sheet_writing.py | BastinFlorian/BoondManager-Auto-Holidays-Validation | 28ae01d997132745018666952829771d5f8d99a3 | [
"MIT"
] | null | null | null | '''Functions writing the needed informations in the google drive spreadsheet
From CP, RTT and holidays request : create a worksheet per employee --
write_info_in_worksheet(info_paie, out_attente, out_valide, name, sh, problemes_date, problemes_type_conge)
'''
from google_sheet_access import *
# Write in worksheet a... | 37.061728 | 112 | 0.651899 |
65f9d6849276abc9d2abce58b864383e8eca894c | 531 | py | Python | madlib.py | Yukthi-C/python_learing | 340579e2bb767e8fdb209f705fdf12058e8e150f | [
"MIT"
] | null | null | null | madlib.py | Yukthi-C/python_learing | 340579e2bb767e8fdb209f705fdf12058e8e150f | [
"MIT"
] | null | null | null | madlib.py | Yukthi-C/python_learing | 340579e2bb767e8fdb209f705fdf12058e8e150f | [
"MIT"
] | null | null | null | ad1 = input(f"Adjective1: ")
ad2 = input(f"Adjective2: ")
part1 = input(f"body part: ")
dish = input(f"Dish: ")
madlib=f"One day, a {ad1} fox invited a stork for dinner. \
Stork was very {ad2} with the invitation she reached the foxs home on time and knocked at the door with her {part1}.\
The fox took her to the... | 59 | 121 | 0.706215 |
65fb489a3669c5076b79a0d2bdaf7df0aec3faeb | 3,114 | py | Python | algofi/v1/send_keyreg_online_transaction.py | Algofiorg/algofi-py-sdk | 6100a6726d36db4d4d3287064f0ad1d0b9a05e03 | [
"MIT"
] | 38 | 2021-12-30T02:32:57.000Z | 2022-03-23T22:09:16.000Z | algofi/v1/send_keyreg_online_transaction.py | Algofiorg/algofi-py-sdk | 6100a6726d36db4d4d3287064f0ad1d0b9a05e03 | [
"MIT"
] | 4 | 2021-11-03T00:14:46.000Z | 2022-03-28T02:17:33.000Z | algofi/v1/send_keyreg_online_transaction.py | Algofiorg/algofi-py-sdk | 6100a6726d36db4d4d3287064f0ad1d0b9a05e03 | [
"MIT"
] | 8 | 2021-12-15T05:29:55.000Z | 2022-02-08T03:45:11.000Z |
from algosdk.future.transaction import ApplicationNoOpTxn
from .prepend import get_init_txns
from ..utils import Transactions, TransactionGroup, int_to_bytes
from ..contract_strings import algofi_manager_strings as manager_strings
def prepare_send_keyreg_online_transactions(sender, suggested_params, storage_account,... | 48.65625 | 168 | 0.756583 |
65fdd0400541291beac65b8a408eaf8121f2b56b | 402 | py | Python | server/resources/platform.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | 1 | 2018-03-12T23:08:12.000Z | 2018-03-12T23:08:12.000Z | server/resources/platform.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | 15 | 2018-03-15T04:23:31.000Z | 2018-06-28T21:46:15.000Z | server/resources/platform.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | null | null | null | from flask_restful import Resource
from server.platform_properties import PLATFORM_PROPERTIES
from server.resources.models.platform_properties import PlatformPropertiesSchema
from server.resources.decorators import marshal_response
| 36.545455 | 80 | 0.840796 |
65febfc830676365453c5d43b397d3e86ac87c5f | 471 | py | Python | invenio_flow/decorators.py | egabancho/invenio-flow | 583e55d17ab6aabd20bc4a46d098f034c0d0f693 | [
"MIT"
] | null | null | null | invenio_flow/decorators.py | egabancho/invenio-flow | 583e55d17ab6aabd20bc4a46d098f034c0d0f693 | [
"MIT"
] | null | null | null | invenio_flow/decorators.py | egabancho/invenio-flow | 583e55d17ab6aabd20bc4a46d098f034c0d0f693 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Esteban J. G. Gabancho.
#
# Invenio-Flow is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Useful decorators."""
from celery import shared_task
from .api import Task
def task(*args, ... | 23.55 | 73 | 0.694268 |
65ff6cff89c7853c15b51290646017146b4909fa | 2,460 | py | Python | backend/offchain/types/fund_pull_pre_approval_types.py | tanshuai/reference-wallet | e8efec4acc6af6e319cf075c10693ddf7754cc83 | [
"Apache-2.0"
] | 14 | 2020-12-17T08:03:51.000Z | 2022-03-26T04:21:18.000Z | backend/offchain/types/fund_pull_pre_approval_types.py | tanshuai/reference-wallet | e8efec4acc6af6e319cf075c10693ddf7754cc83 | [
"Apache-2.0"
] | 20 | 2020-12-15T12:02:56.000Z | 2021-05-19T23:37:34.000Z | backend/offchain/types/fund_pull_pre_approval_types.py | tanshuai/reference-wallet | e8efec4acc6af6e319cf075c10693ddf7754cc83 | [
"Apache-2.0"
] | 12 | 2020-12-10T16:35:27.000Z | 2022-02-01T04:06:10.000Z | import typing
from dataclasses import dataclass, field as datafield
from .command_types import CommandType
class FundPullPreApprovalType:
save_sub_account = "save_sub_account"
consent = "consent"
| 27.032967 | 88 | 0.681301 |
65ffb62169d811cc14af150c5eafa69ec8772792 | 19,924 | py | Python | data/battle_animation_scripts.py | kielbasiago/WorldsCollide | 5aa7cffdecd14754c9eaa83cd0ad4d0282cc2cc2 | [
"MIT"
] | 7 | 2022-01-15T02:53:53.000Z | 2022-02-17T00:51:32.000Z | data/battle_animation_scripts.py | asilverthorn/WorldsCollide | 5aa7cffdecd14754c9eaa83cd0ad4d0282cc2cc2 | [
"MIT"
] | 8 | 2022-01-16T02:45:24.000Z | 2022-03-21T02:08:27.000Z | data/battle_animation_scripts.py | asilverthorn/WorldsCollide | 5aa7cffdecd14754c9eaa83cd0ad4d0282cc2cc2 | [
"MIT"
] | 5 | 2022-01-15T02:53:38.000Z | 2022-01-19T17:42:10.000Z | # List of addresses within the Battle Animation Scripts for the following commands which cause screen flashes:
# B0 - Set background palette color addition (absolute)
# B5 - Add color to background palette (relative)
# AF - Set background palette color subtraction (absolute)
# B6 - Subtract color from backgroun... | 58.428152 | 133 | 0.630546 |
65ffed323033ff0ac5225d3d784dead8adf418b4 | 2,643 | py | Python | Jumpscale/tools/capacity/reality_parser.py | threefoldtech/JumpscaleX | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 2 | 2019-05-09T07:21:25.000Z | 2019-08-05T06:37:53.000Z | Jumpscale/tools/capacity/reality_parser.py | threefoldtech/JumpscaleX | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 664 | 2018-12-19T12:43:44.000Z | 2019-08-23T04:24:42.000Z | Jumpscale/tools/capacity/reality_parser.py | threefoldtech/jumpscale10 | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 7 | 2019-05-03T07:14:37.000Z | 2019-08-05T12:36:52.000Z | """
this module contain the logic of parsing the actual usage of the ressource unit of a zero-os node
"""
from .units import GiB
from sal_zos.disks.Disks import StorageType
__str__ = __repr__
def _parse_memory(used_memory):
"""
convert the used memory in bytes to ressource units
:param used_me... | 26.69697 | 97 | 0.626182 |
5a01dafbd8cdef4d174904ccd475a2627ada858d | 3,314 | py | Python | fsem/similarity_measures/jaro.py | sajith-rahim/fs-em | 2e8dde8b5f36ee1e1dfc5407611ec2fb91630c2a | [
"BSD-3-Clause"
] | null | null | null | fsem/similarity_measures/jaro.py | sajith-rahim/fs-em | 2e8dde8b5f36ee1e1dfc5407611ec2fb91630c2a | [
"BSD-3-Clause"
] | null | null | null | fsem/similarity_measures/jaro.py | sajith-rahim/fs-em | 2e8dde8b5f36ee1e1dfc5407611ec2fb91630c2a | [
"BSD-3-Clause"
] | null | null | null | import math
__all__ = ['get_jaro_distance']
__author__ = 'Jean-Bernard Ratte - jean.bernard.ratte@unary.ca'
""" Find the Jaro Winkler Distance which indicates the similarity score between two Strings.
The Jaro measure is the weighted sum of percentage of matched characters from each file and transposed characters... | 31.561905 | 118 | 0.658117 |
5a0258dc0630fde008fae59e8ca2f2322000aca2 | 732 | py | Python | UnitTests/FullAtomModel/PDB2Coords/test.py | dendisuhubdy/TorchProteinLibrary | 89f0f6c311658b9313484cd92804682a251b1b97 | [
"MIT"
] | null | null | null | UnitTests/FullAtomModel/PDB2Coords/test.py | dendisuhubdy/TorchProteinLibrary | 89f0f6c311658b9313484cd92804682a251b1b97 | [
"MIT"
] | null | null | null | UnitTests/FullAtomModel/PDB2Coords/test.py | dendisuhubdy/TorchProteinLibrary | 89f0f6c311658b9313484cd92804682a251b1b97 | [
"MIT"
] | null | null | null | import sys
import os
import matplotlib.pylab as plt
import numpy as np
import mpl_toolkits.mplot3d.axes3d as p3
import seaborn as sea
import torch
from TorchProteinLibrary import FullAtomModel
if __name__=='__main__':
# p2c = FullAtomModel.PDB2Coords.PDB2CoordsBiopython()
p2c = FullAtomModel.PDB2CoordsUnorde... | 24.4 | 58 | 0.674863 |
5a025cdbfc11bf834d39b1a16efe1582cdd5e329 | 4,306 | py | Python | vae/scripts/gm_vae_fc_toy.py | ondrejba/vae | 23f179637ca45c20d4e5f74e8c56b62f57554ef4 | [
"MIT"
] | 1 | 2019-11-23T20:51:58.000Z | 2019-11-23T20:51:58.000Z | vae/scripts/gm_vae_fc_toy.py | ondrejba/vae | 23f179637ca45c20d4e5f74e8c56b62f57554ef4 | [
"MIT"
] | null | null | null | vae/scripts/gm_vae_fc_toy.py | ondrejba/vae | 23f179637ca45c20d4e5f74e8c56b62f57554ef4 | [
"MIT"
] | 1 | 2021-12-01T07:29:39.000Z | 2021-12-01T07:29:39.000Z | import argparse
import collections
import os
import numpy as np
import matplotlib.pyplot as plt
from .. import toy_dataset
from .. import gm_vae_fc
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--num-training-steps", type=int, default=100000)
parser.add_argument("--... | 31.202899 | 107 | 0.65699 |
5a054c6f2f48cad9dc180b59f6e0034f5b144f73 | 331 | py | Python | codes/day06/03.py | Youngfellows/HPyBaseCode | 94d11872795d85b8c4387b650e82edcd20da0667 | [
"Apache-2.0"
] | null | null | null | codes/day06/03.py | Youngfellows/HPyBaseCode | 94d11872795d85b8c4387b650e82edcd20da0667 | [
"Apache-2.0"
] | null | null | null | codes/day06/03.py | Youngfellows/HPyBaseCode | 94d11872795d85b8c4387b650e82edcd20da0667 | [
"Apache-2.0"
] | null | null | null |
wangcai = Dog("")
#wangcai.printColor()
xiaoqiang = Dog("")
#xiaoqiang.printColor()
test(wangcai)
| 15.045455 | 34 | 0.592145 |
5a05e2efcbe249cfc654b1e6e98561ecca3c15b5 | 1,158 | py | Python | LC_problems/699.py | Howardhuang98/Blog | cf58638d6d0bbf55b95fe08e43798e7dd14219ac | [
"MIT"
] | null | null | null | LC_problems/699.py | Howardhuang98/Blog | cf58638d6d0bbf55b95fe08e43798e7dd14219ac | [
"MIT"
] | null | null | null | LC_problems/699.py | Howardhuang98/Blog | cf58638d6d0bbf55b95fe08e43798e7dd14219ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
@File : 699.py
@Contact : huanghoward@foxmail.com
@Modify Time : 2022/5/26 17:22
------------
"""
from typing import List
if __name__ == '__main__':
s = Solution()
print(s.fallingSquares([[9, 6], [2, 2], [2, 6]]))
| 28.95 | 105 | 0.443005 |
5a05e7be3fed210c95055f9564a15535552003ac | 5,150 | py | Python | plastid/test/functional/test_metagene.py | joshuagryphon/plastid | e63a818e33766b01d84b3ac9bc9f55e6a1ece42f | [
"BSD-3-Clause"
] | 31 | 2016-04-05T09:58:29.000Z | 2022-01-18T11:58:30.000Z | plastid/test/functional/test_metagene.py | joshuagryphon/plastid | e63a818e33766b01d84b3ac9bc9f55e6a1ece42f | [
"BSD-3-Clause"
] | 49 | 2015-09-15T19:50:13.000Z | 2022-01-06T18:17:35.000Z | plastid/test/functional/test_metagene.py | joshuagryphon/plastid | e63a818e33766b01d84b3ac9bc9f55e6a1ece42f | [
"BSD-3-Clause"
] | 14 | 2017-02-08T09:38:57.000Z | 2020-09-16T02:32:46.000Z | #!/usr/bin/env python
"""Test suite for :py:mod:`plastid.bin.metagene`"""
import tempfile
import os
from pkg_resources import resource_filename, cleanup_resources
from nose.plugins.attrib import attr
from plastid.test.functional.base import execute_helper
from plastid.test.ref_files import (
RPATH,
REF_FILES,
... | 39.615385 | 100 | 0.594175 |
5a0619271eef494f524dc719a9ba4f63c1373613 | 4,967 | py | Python | tests/router/test_router.py | macneiln/ombott | f18f6e0e639f20efb63b137edbab8c8b3871d354 | [
"MIT"
] | null | null | null | tests/router/test_router.py | macneiln/ombott | f18f6e0e639f20efb63b137edbab8c8b3871d354 | [
"MIT"
] | null | null | null | tests/router/test_router.py | macneiln/ombott | f18f6e0e639f20efb63b137edbab8c8b3871d354 | [
"MIT"
] | null | null | null | import pytest
from ombott.router import RadiRouter, Route
from ombott.router.errors import RouteMethodError
route_meth_handler_path = [
('/foo/bar', 'GET', 'foo_bar:get', '/foo/bar'),
('/foo/bar', 'POST', 'foo_bar:post', '/foo/bar/'),
('/foo/bar', ['PUT', 'PATCH'], 'foo_bar:put,patch', 'foo/bar'),
('f... | 29.742515 | 92 | 0.582444 |
5a06baf447f7c7644ae324b314d4d848bee4ba67 | 12,225 | py | Python | app_api/serializers.py | pkucsie/SIEPServer | 00b0637eb8302135dfc772fccd18cd749a93e5c6 | [
"Apache-2.0"
] | 2 | 2021-02-12T10:02:42.000Z | 2021-03-15T13:08:04.000Z | app_api/serializers.py | pkucsie/SIEPServer | 00b0637eb8302135dfc772fccd18cd749a93e5c6 | [
"Apache-2.0"
] | null | null | null | app_api/serializers.py | pkucsie/SIEPServer | 00b0637eb8302135dfc772fccd18cd749a93e5c6 | [
"Apache-2.0"
] | null | null | null | import datetime
import time
from utils import utils
from rest_framework import serializers
from rest_framework.relations import StringRelatedField
from app_api.models import Album, Info, Order, Coupon, Integral, Notice, Lesson, Question, Cart, Setup, User, Bill, Address, Catalog, Log, \
ReadType, Teacher, Commen... | 23.41954 | 140 | 0.674683 |
5a07b3f93f0df160b35b13e2ca081e2f2413ce44 | 718 | py | Python | 6_API/pytorch/configure.py | misoA/DeepCalendar | 50cafc1e70f125f3b6b42cd88e1e9dd071676b49 | [
"MIT"
] | null | null | null | 6_API/pytorch/configure.py | misoA/DeepCalendar | 50cafc1e70f125f3b6b42cd88e1e9dd071676b49 | [
"MIT"
] | 3 | 2019-01-14T06:59:24.000Z | 2019-01-14T07:48:38.000Z | 6_API/pytorch/configure.py | misoA/DeepCalendar | 50cafc1e70f125f3b6b42cd88e1e9dd071676b49 | [
"MIT"
] | 5 | 2019-01-08T05:01:26.000Z | 2021-05-17T23:34:51.000Z | # -*- coding: utf-8 -*-
# This file is made to configure every file number at one place
# Choose the place you are training at
# AWS : 0, Own PC : 1
PC = 1
path_list = ["/jet/prs/workspace/", "."]
url = path_list[PC]
clothes = ['shirt',
'jeans',
'blazer',
'chino-pants',
'jacket'... | 17.95 | 63 | 0.431755 |
5a0835b17e7c0f765c8aa93d7341da5395fe71d2 | 32 | py | Python | provider/__init__.py | depop/django-oauth2-provider | afcdef72747233dc0259a4bc068a8086ba7a69d3 | [
"MIT"
] | 1 | 2020-05-10T00:11:05.000Z | 2020-05-10T00:11:05.000Z | provider/__init__.py | depop/django-oauth2-provider | afcdef72747233dc0259a4bc068a8086ba7a69d3 | [
"MIT"
] | 1 | 2016-05-23T15:22:41.000Z | 2016-05-23T15:22:41.000Z | provider/__init__.py | depop/django-oauth2-provider | afcdef72747233dc0259a4bc068a8086ba7a69d3 | [
"MIT"
] | null | null | null | __version__ = "0.2.7+depop.6.1"
| 16 | 31 | 0.65625 |
5a0841fa1b97d80f5fc2c97be82b59ce57dfb2d4 | 7,381 | py | Python | python/craftassist/voxel_models/subcomponent_classifier.py | kayburns/craftassist | 07909493d320afc2c9ff428d0891bc3acd4dc68f | [
"MIT"
] | null | null | null | python/craftassist/voxel_models/subcomponent_classifier.py | kayburns/craftassist | 07909493d320afc2c9ff428d0891bc3acd4dc68f | [
"MIT"
] | null | null | null | python/craftassist/voxel_models/subcomponent_classifier.py | kayburns/craftassist | 07909493d320afc2c9ff428d0891bc3acd4dc68f | [
"MIT"
] | null | null | null | """
Copyright (c) Facebook, Inc. and its affiliates.
"""
import logging
import queue
from multiprocessing import Queue, Process
import sys
import os
from mc_memory_nodes import InstSegNode, PropSegNode
from heuristic_perception import all_nearby_objects
from shapes import get_bounds
VISION_DIR = os.path.dirname(os.pa... | 38.243523 | 116 | 0.582441 |
5a0b2d031fe808c99bfba67eaa85c3e839cc5992 | 197 | py | Python | tests/test_problem16.py | nolanwrightdev/blind-75-python | b92ef3449eb0143c760ddd339897a3f0a2972830 | [
"MIT"
] | 6 | 2020-02-01T23:29:51.000Z | 2022-02-20T20:46:56.000Z | tests/test_problem16.py | nolanwrightdev/blind-75-python | b92ef3449eb0143c760ddd339897a3f0a2972830 | [
"MIT"
] | null | null | null | tests/test_problem16.py | nolanwrightdev/blind-75-python | b92ef3449eb0143c760ddd339897a3f0a2972830 | [
"MIT"
] | null | null | null | import unittest
from problems.problem16 import solution
| 21.888889 | 45 | 0.71066 |
5a0b50f8318c63395085bc807823eccbb8a5e4b9 | 510 | py | Python | project/dynamic.py | andresitodeguzman/smspy | 29b9feb4356de5dbd1a5d222d38d45396a349d23 | [
"Apache-2.0"
] | 4 | 2017-01-27T05:15:09.000Z | 2020-12-08T13:24:19.000Z | project/dynamic.py | andresitodeguzman/smspy | 29b9feb4356de5dbd1a5d222d38d45396a349d23 | [
"Apache-2.0"
] | 1 | 2019-05-20T15:09:53.000Z | 2019-05-20T15:09:53.000Z | project/dynamic.py | andresitodeguzman/smspy | 29b9feb4356de5dbd1a5d222d38d45396a349d23 | [
"Apache-2.0"
] | null | null | null | ##
## DYNAMIC
##
## Import the module explicitly (import dynamics.<module_name> as module_name)
import dynamics.root as root
## Register all modules for checking here. If something interferes, rearrange the order
## module_name_ = module_name.do(params)
| 21.25 | 88 | 0.666667 |
5a0bac916180eec03144ad684ddb2ec3547f8ee7 | 288 | py | Python | accounts/urls.py | mishrakeshav/Django-Real-Estate-Website | 4f6146ad8d13003f890677c2c1af82b26c69678b | [
"MIT"
] | null | null | null | accounts/urls.py | mishrakeshav/Django-Real-Estate-Website | 4f6146ad8d13003f890677c2c1af82b26c69678b | [
"MIT"
] | 7 | 2021-04-08T20:21:35.000Z | 2022-01-13T03:27:33.000Z | accounts/urls.py | mishrakeshav/Django-Real-Estate-Website | 4f6146ad8d13003f890677c2c1af82b26c69678b | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('login', views.login, name = 'login'),
path('register', views.register, name = 'register'),
path('logout', views.logout, name = 'logout'),
path('dashboard', views.dashboard, name = 'dashboard'),
] | 28.8 | 59 | 0.645833 |
5a0e378937b9fd8ab97a5e345d693d92224ab800 | 4,333 | py | Python | src/past/types/oldstr.py | kianmeng/python-future | 80523f383fbba1c6de0551e19d0277e73e69573c | [
"MIT"
] | 908 | 2015-01-01T21:20:45.000Z | 2022-03-29T20:47:16.000Z | src/past/types/oldstr.py | kianmeng/python-future | 80523f383fbba1c6de0551e19d0277e73e69573c | [
"MIT"
] | 402 | 2015-01-04T01:30:19.000Z | 2022-03-24T11:56:38.000Z | src/past/types/oldstr.py | kianmeng/python-future | 80523f383fbba1c6de0551e19d0277e73e69573c | [
"MIT"
] | 305 | 2015-01-18T19:29:37.000Z | 2022-03-24T09:40:09.000Z | """
Pure-Python implementation of a Python 2-like str object for Python 3.
"""
from numbers import Integral
from past.utils import PY2, with_metaclass
if PY2:
from collections import Iterable
else:
from collections.abc import Iterable
_builtin_bytes = bytes
def unescape(s):
r"""
Interprets string... | 31.860294 | 95 | 0.558505 |
5a0e75196f538319c5078d09117599bf367b0df0 | 1,208 | py | Python | app/api/utlis/models.py | jurekpawlikowski/flask-boilerplate | 15b7e6c4e0241a7d59dbca543e023a22b17b9903 | [
"MIT"
] | 3 | 2017-08-05T08:57:37.000Z | 2021-03-03T09:09:03.000Z | app/api/utlis/models.py | jurekpawlikowski/flask-boilerplate | 15b7e6c4e0241a7d59dbca543e023a22b17b9903 | [
"MIT"
] | null | null | null | app/api/utlis/models.py | jurekpawlikowski/flask-boilerplate | 15b7e6c4e0241a7d59dbca543e023a22b17b9903 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
from sqlalchemy.event import listen
from app.factory import db
def set_updated_at(target, value, oldvalue):
"""
Set updated_at value
"""
value.updated_at = datetime.now()
listen(BaseModel, "before_update", set_updated_at)... | 23.686275 | 80 | 0.647351 |
5a0fd6978a62253af90bdbf0d79e056e97e5921d | 1,391 | py | Python | source/tweaks/cms_plugins.py | mverleg/svsite | 5c9dbcacf81020cf0c1960e337bdd33113acd597 | [
"BSD-3-Clause"
] | null | null | null | source/tweaks/cms_plugins.py | mverleg/svsite | 5c9dbcacf81020cf0c1960e337bdd33113acd597 | [
"BSD-3-Clause"
] | 142 | 2015-06-05T07:53:09.000Z | 2020-03-31T18:37:07.000Z | source/tweaks/cms_plugins.py | mdilli/svsite | 5c9dbcacf81020cf0c1960e337bdd33113acd597 | [
"BSD-3-Clause"
] | null | null | null |
"""
Raw HTML widget.
Adapted/copied from https://github.com/makukha/cmsplugin-raw-html
"""
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.template import Template
from django.utils.safestring import mark_safe
from .models import RawHtmlModel, CMSMember
from django.utils.... | 24.839286 | 79 | 0.757009 |
5a1046d61cc7585c8ffb76dc65a2afa1c14d62a9 | 3,296 | py | Python | tests/test_trackings.py | EugeneLiu/aftership-sdk-python | 37184272869452734d616b31295a4ac883051f5d | [
"MIT"
] | null | null | null | tests/test_trackings.py | EugeneLiu/aftership-sdk-python | 37184272869452734d616b31295a4ac883051f5d | [
"MIT"
] | null | null | null | tests/test_trackings.py | EugeneLiu/aftership-sdk-python | 37184272869452734d616b31295a4ac883051f5d | [
"MIT"
] | null | null | null | from unittest import TestCase, mock
import pytest
from requests import Response
import aftership
| 34.694737 | 116 | 0.681129 |
5a105c110cc6114a77deee02c167af5066ada602 | 1,089 | py | Python | 071_caixaeletronico.py | laissilveira/python-exercises | 906f7e46878b296ecb9b9df9fd39ec1e362ce3a4 | [
"MIT"
] | null | null | null | 071_caixaeletronico.py | laissilveira/python-exercises | 906f7e46878b296ecb9b9df9fd39ec1e362ce3a4 | [
"MIT"
] | null | null | null | 071_caixaeletronico.py | laissilveira/python-exercises | 906f7e46878b296ecb9b9df9fd39ec1e362ce3a4 | [
"MIT"
] | null | null | null | # Calcula a quantidade de notas de cada valor a serem sacadas em uma caixa eletrnico
print('=' * 30)
print('{:^30}'.format('CAIXA ELETRNICO'))
print('=' * 30)
valor = int(input('Valor a ser sacado: R$ '))
# notas de real (R$) existentes
tot200 = valor // 200
tot100 = (valor % 200) // 100
tot50 = ((valor % 200) % 100) /... | 36.3 | 85 | 0.543618 |