hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795eef2d198c5640931409a38af9ce131d001a4f | 1,168 | py | Python | user/user_function.py | Dorothy-hyy/w4156-boilerplate-gcloud | d3c90497db39f81eb2b93eac80d4b10b19a3c266 | [
"Apache-2.0"
] | null | null | null | user/user_function.py | Dorothy-hyy/w4156-boilerplate-gcloud | d3c90497db39f81eb2b93eac80d4b10b19a3c266 | [
"Apache-2.0"
] | null | null | null | user/user_function.py | Dorothy-hyy/w4156-boilerplate-gcloud | d3c90497db39f81eb2b93eac80d4b10b19a3c266 | [
"Apache-2.0"
] | 1 | 2018-03-02T01:00:34.000Z | 2018-03-02T01:00:34.000Z | import unittest
class User:
# This is user infor, the users are stored in a dictionary
def __init__(self):
self.users = {}
def create_user(self,userName):
if userName == None or userName == "":
return "Invalid userName"
if userName not in self.users: # The userName is u... | 37.677419 | 128 | 0.625 |
795eef5620e6a91093a52ead0636f0b2a0bf0c63 | 4,782 | py | Python | bookshelf/views.py | abdulhannan44/LIbrary-Management-Sys | bc3a15c2d017e6dbf91edf15c2791807bd078692 | [
"MIT"
] | 34 | 2019-02-08T17:15:16.000Z | 2021-03-25T10:12:56.000Z | bookshelf/views.py | abdulhannan44/LIbrary-Management-Sys | bc3a15c2d017e6dbf91edf15c2791807bd078692 | [
"MIT"
] | 13 | 2019-03-06T06:23:37.000Z | 2021-06-10T17:48:33.000Z | bookshelf/views.py | tinkerhubcek/Project-Libra | 419d104868efad7b793ec8c95235a8870d99ea6e | [
"MIT"
] | 15 | 2019-02-13T18:50:29.000Z | 2020-12-27T06:03:22.000Z | from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from django.views import generic
from django.db.models import Q
from rest_framework import viewsets
from .forms import *
from .models import *
from .serializers import *
# Create your views here.
@login_required
def main_pag... | 26.715084 | 96 | 0.669176 |
795ef067c200ced906f8a598504c9c0422379c6f | 2,016 | py | Python | monitor/core/analysis.py | laozhudetui/wam | 3101dae034344ec255c9f3dd165d2aae6b3bea95 | [
"MIT"
] | 227 | 2018-08-25T12:50:30.000Z | 2022-03-31T11:18:33.000Z | monitor/core/analysis.py | laozhudetui/wam | 3101dae034344ec255c9f3dd165d2aae6b3bea95 | [
"MIT"
] | 1 | 2018-09-02T07:51:32.000Z | 2018-09-03T00:29:45.000Z | monitor/core/analysis.py | laozhudetui/wam | 3101dae034344ec255c9f3dd165d2aae6b3bea95 | [
"MIT"
] | 48 | 2018-08-25T13:57:52.000Z | 2022-01-10T15:59:27.000Z | #!/usr/bin/env python
# coding: utf-8
# __buildin__ modules
import os
import re
import sys
import json as simplejson
# monitor modules
from monitor.core.exception import MonitorAnalysisError
from monitor.core.settings import ANALYSIS_PLUGIN_DIR
FILTER_MODULES = ['__init__.py', 'baseframe.py']
def import_module_wi... | 26.526316 | 80 | 0.662202 |
795ef0dbc4c47d4f3ee603eb8b80e45b6a52ef45 | 25,683 | py | Python | python/pyspark/sql/context.py | netpaladinx/spark-matrix | 839d0ce56ea3b54a83eb943d3890dc416cae85fb | [
"Apache-2.0"
] | 6 | 2016-02-26T16:38:13.000Z | 2018-04-25T04:04:37.000Z | python/pyspark/sql/context.py | netpaladinx/spark-matrix | 839d0ce56ea3b54a83eb943d3890dc416cae85fb | [
"Apache-2.0"
] | 1 | 2015-03-10T18:41:56.000Z | 2015-03-10T18:41:56.000Z | python/pyspark/sql/context.py | netpaladinx/spark-matrix | 839d0ce56ea3b54a83eb943d3890dc416cae85fb | [
"Apache-2.0"
] | 13 | 2015-03-27T12:33:23.000Z | 2021-06-08T18:37:44.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 39.091324 | 99 | 0.595063 |
795ef236aa4824a26f15d9bd7b44c0404495c846 | 1,560 | py | Python | images/script.py | Sorong/Smarrium | dc3a6b8e0d428e01b936679a8ca221c2b610b0f6 | [
"MIT"
] | null | null | null | images/script.py | Sorong/Smarrium | dc3a6b8e0d428e01b936679a8ca221c2b610b0f6 | [
"MIT"
] | null | null | null | images/script.py | Sorong/Smarrium | dc3a6b8e0d428e01b936679a8ca221c2b610b0f6 | [
"MIT"
] | null | null | null | import argparse
import imutils
import cv2
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-f", "--first", required=True,
help="first input image")
ap.add_argument("-s", "--second", required=True,
help="second input file")
ap.add_argument("-a", "--min-area", typ... | 31.2 | 69 | 0.707051 |
795ef3c45e08575c4c69b50ba074bf8055e5a5f5 | 18,851 | py | Python | core/domain/classifier_services.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | 2 | 2018-12-14T05:46:31.000Z | 2019-01-04T21:52:44.000Z | core/domain/classifier_services.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | 5 | 2018-06-09T02:05:45.000Z | 2018-09-20T13:53:42.000Z | core/domain/classifier_services.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 39.686316 | 80 | 0.719962 |
795ef4257299e2ff5f0aaae78cfd63bac42268b2 | 2,017 | py | Python | atlas/foundations_core_rest_api_components/src/foundations_core_rest_api_components/filters/exact_match_filter.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 296 | 2020-03-16T19:55:00.000Z | 2022-01-10T19:46:05.000Z | atlas/foundations_core_rest_api_components/src/foundations_core_rest_api_components/filters/exact_match_filter.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 57 | 2020-03-17T11:15:57.000Z | 2021-07-10T14:42:27.000Z | atlas/foundations_core_rest_api_components/src/foundations_core_rest_api_components/filters/exact_match_filter.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 38 | 2020-03-17T21:06:05.000Z | 2022-02-08T03:19:34.000Z | from foundations_core_rest_api_components.filters.api_filter_mixin import APIFilterMixin
class ExactMatchFilter(APIFilterMixin):
def __init__(self):
self._parsing_state = {}
def __call__(self, result, params):
if result and isinstance(result, list):
self._filter(result, params)
... | 39.54902 | 92 | 0.688151 |
795ef435eb14da167329fbf319c585fe1f9b1dd7 | 855 | py | Python | relier/web/views/login.py | citruspi/relier-api | 799e9ea60431712612667bf06d09c418456e3f33 | [
"Unlicense"
] | null | null | null | relier/web/views/login.py | citruspi/relier-api | 799e9ea60431712612667bf06d09c418456e3f33 | [
"Unlicense"
] | null | null | null | relier/web/views/login.py | citruspi/relier-api | 799e9ea60431712612667bf06d09c418456e3f33 | [
"Unlicense"
] | null | null | null | from flask.views import MethodView
from flask import render_template, request, flash, redirect, session
from relier.models import User
class Login(MethodView):
def get(self):
return render_template('login.j2')
def post(self):
if request.form.get('email_address') is None:
flash('... | 26.71875 | 68 | 0.608187 |
795ef65e4bee6b5cc386ace724fc43920253c6c3 | 22,334 | py | Python | hcam_widgets/ucam.py | HiPERCAM/hcam_widgets | 8b4e1c48367ed392bc67b1e91fa04498dba96153 | [
"MIT"
] | null | null | null | hcam_widgets/ucam.py | HiPERCAM/hcam_widgets | 8b4e1c48367ed392bc67b1e91fa04498dba96153 | [
"MIT"
] | 11 | 2017-11-20T09:43:04.000Z | 2021-08-02T09:47:45.000Z | hcam_widgets/ucam.py | HiPERCAM/hcam_widgets | 8b4e1c48367ed392bc67b1e91fa04498dba96153 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
ucam provides classes and data specific to ULTRACAM
"""
from __future__ import print_function, absolute_import, unicode_literals, division
import six
import math
# internal imports
from . import widgets as w
from .tkutils import get_root
if not six.PY3:
import Tkinter as tk
else:
imp... | 37.285476 | 100 | 0.560177 |
795ef8e1b2d17aaa010ba29ce0aa58383eaca0cb | 1,394 | pyde | Python | animation_maker/animation_maker/animation_maker.pyde | beezow/TeachDotPy | e7f906e6ebfa66820c2bb3256c1953a27fd3be17 | [
"MIT-feh"
] | 6 | 2019-02-23T08:03:12.000Z | 2022-02-16T03:13:44.000Z | animation_maker/animation_maker/animation_maker.pyde | beezow/TeachDotPy | e7f906e6ebfa66820c2bb3256c1953a27fd3be17 | [
"MIT-feh"
] | null | null | null | animation_maker/animation_maker/animation_maker.pyde | beezow/TeachDotPy | e7f906e6ebfa66820c2bb3256c1953a27fd3be17 | [
"MIT-feh"
] | 1 | 2021-05-16T00:00:55.000Z | 2021-05-16T00:00:55.000Z | import json
import copy
from variable import *
from frame import *
from visual_list import *
from json_parser import *
from two_dimensional_list import *
w = 1080
h = int(w * 2 / 2.8)
var = None
slides = []
slide_number = 0
def setup():
global var, slides, slide_number
size(w, h)
myFont = create... | 24.892857 | 71 | 0.61693 |
795ef8f08f6ec212879f528c6a0c2f0bd73037f0 | 3,567 | py | Python | sympy/combinatorics/tests/test_generators.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | sympy/combinatorics/tests/test_generators.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | sympy/combinatorics/tests/test_generators.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | from sympy.combinatorics.generators import symmetric, cyclic, alternating, \
dihedral, rubik
from sympy.combinatorics.permutations import Permutation
from sympy.testing.pytest import raises
def test_generators():
assert list(cyclic(6)) == [
Permutation([0, 1, 2, 3, 4, 5]),
Permutation([1, 2, 3... | 33.650943 | 76 | 0.461733 |
795ef9469c0191e3b98190e3b6418e226098a531 | 1,196 | py | Python | implementations/bicyclegan/datasets.py | M-a-s-o/PyTorch-GAN | 2120fc89aa1a5ba45ecfe8631fc791d39b98a01b | [
"MIT"
] | null | null | null | implementations/bicyclegan/datasets.py | M-a-s-o/PyTorch-GAN | 2120fc89aa1a5ba45ecfe8631fc791d39b98a01b | [
"MIT"
] | null | null | null | implementations/bicyclegan/datasets.py | M-a-s-o/PyTorch-GAN | 2120fc89aa1a5ba45ecfe8631fc791d39b98a01b | [
"MIT"
] | null | null | null | import glob
import os
import numpy as np
from torch.utils.data import Dataset
from PIL import Image
import torchvision.transforms as transforms
from torchvision.transforms import InterpolationMode
class ImageDataset(Dataset):
def __init__(self, root, input_shape, mode="train"):
self.transform = transforms.... | 30.666667 | 79 | 0.578595 |
795ef996830897d6c02cc6eb0374f07b5ff9d31d | 286 | py | Python | python_toolbox/emitting/emitter_system/__init__.py | hboshnak/python_toolbox | cb9ef64b48f1d03275484d707dc5079b6701ad0c | [
"MIT"
] | 119 | 2015-02-05T17:59:47.000Z | 2022-02-21T22:43:40.000Z | python_toolbox/emitting/emitter_system/__init__.py | hboshnak/python_toolbox | cb9ef64b48f1d03275484d707dc5079b6701ad0c | [
"MIT"
] | 4 | 2019-04-24T14:01:14.000Z | 2020-05-21T12:03:29.000Z | python_toolbox/emitting/emitter_system/__init__.py | hboshnak/python_toolbox | cb9ef64b48f1d03275484d707dc5079b6701ad0c | [
"MIT"
] | 14 | 2015-03-30T06:30:42.000Z | 2021-12-24T23:45:11.000Z | # Copyright 2009-2017 Ram Rachum.
# This program is distributed under the MIT license.
'''
Defines an EmitterSystem, which offers some benefits over Emitter.
See documentation of EmitterSystem for more info.
'''
from .emitter_system import EmitterSystem
from .emitter import Emitter | 23.833333 | 66 | 0.793706 |
795efb16f6f5400922c494614e212bc90f28aa40 | 2,290 | py | Python | extract.py | 641i130/klbvfs | b2cf96b8820ee9d81767652e250c3643ba48ec87 | [
"Unlicense"
] | null | null | null | extract.py | 641i130/klbvfs | b2cf96b8820ee9d81767652e250c3643ba48ec87 | [
"Unlicense"
] | null | null | null | extract.py | 641i130/klbvfs | b2cf96b8820ee9d81767652e250c3643ba48ec87 | [
"Unlicense"
] | null | null | null | import os
import UnityPy
from PIL import Image
def unpack_all_assets(source_folder : str, destination_folder : str):
# iterate over all files in source folder
for root, dirs, files in os.walk(source_folder):
for file_name in files:
# generate file_path
file_path = os.path.join(r... | 39.482759 | 82 | 0.455895 |
795efb60297f38308c3950714b794fba6976c2db | 13,332 | py | Python | lm_eval/tasks/superglue.py | leogao2/lm-evaluation-harness | 7ff58fe17c9c212f5387a3fcfaf86d22075cb79a | [
"MIT"
] | 1 | 2021-03-29T03:14:05.000Z | 2021-03-29T03:14:05.000Z | lm_eval/tasks/superglue.py | leogao2/lm-evaluation-harness | 7ff58fe17c9c212f5387a3fcfaf86d22075cb79a | [
"MIT"
] | null | null | null | lm_eval/tasks/superglue.py | leogao2/lm-evaluation-harness | 7ff58fe17c9c212f5387a3fcfaf86d22075cb79a | [
"MIT"
] | null | null | null | """
To-do:
- WSC requires free-form generation
- ReCoRD
"""
import numpy as np
import sklearn
import transformers.data.metrics.squad_metrics as squad_metrics
from . common import HFTask, yesno
from lm_eval.base import rf
from ..metrics import mean, acc_all, metric_max_over_ground_truths
from ..utils import gene... | 27.891213 | 113 | 0.577558 |
795efc4773fe7c1b62ac2b4e3e183a27deb0b334 | 2,748 | py | Python | project/tests/test_view_sql_detail.py | lokeshatbigbasket/silk | 365ee39d92a95842d67382d31883dca8fdeda982 | [
"MIT"
] | null | null | null | project/tests/test_view_sql_detail.py | lokeshatbigbasket/silk | 365ee39d92a95842d67382d31883dca8fdeda982 | [
"MIT"
] | null | null | null | project/tests/test_view_sql_detail.py | lokeshatbigbasket/silk | 365ee39d92a95842d67382d31883dca8fdeda982 | [
"MIT"
] | null | null | null | import os
import random
try:
# Django >= 1.10
from django.urls import reverse
except ImportError:
# Django < 2.0
from django.core.urlresolvers import reverse
from django.test import TestCase
from silk.config import SilkyConfig
from silk.middleware import silky_reverse
from silk.views.sql_detail import... | 42.9375 | 126 | 0.59425 |
795efd615c94f076c6b36361a049ed47b583c67a | 2,489 | py | Python | scripts/getRawDataGeometryStructure.py | voxie-viewer/voxie | d2b5e6760519782e9ef2e51f5322a3baa0cb1198 | [
"MIT"
] | 4 | 2016-06-03T18:41:43.000Z | 2020-04-17T20:28:58.000Z | scripts/getRawDataGeometryStructure.py | voxie-viewer/voxie | d2b5e6760519782e9ef2e51f5322a3baa0cb1198 | [
"MIT"
] | null | null | null | scripts/getRawDataGeometryStructure.py | voxie-viewer/voxie | d2b5e6760519782e9ef2e51f5322a3baa0cb1198 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#
# Copyright (c) 2014-2022 The Voxie Authors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy,... | 39.507937 | 106 | 0.66131 |
795efdbce9304dc9b8682d037894d4802af3815a | 28,646 | py | Python | lithops/serverless/backends/knative/knative.py | gfinol/lithops | e165a78e0facbb70c852d7627a7407e8a8d1b946 | [
"Apache-2.0"
] | null | null | null | lithops/serverless/backends/knative/knative.py | gfinol/lithops | e165a78e0facbb70c852d7627a7407e8a8d1b946 | [
"Apache-2.0"
] | null | null | null | lithops/serverless/backends/knative/knative.py | gfinol/lithops | e165a78e0facbb70c852d7627a7407e8a8d1b946 | [
"Apache-2.0"
] | null | null | null | #
# (C) Copyright IBM Corp. 2020
#
# 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 writi... | 44.20679 | 142 | 0.598129 |
795efe54fc759d840752c6ae75f37e2a180a1251 | 7,947 | py | Python | procgen/env.py | k4ntz/procgen | dca9c99379ba1f68573d035b0c6522f11c726808 | [
"MIT"
] | 1 | 2022-02-21T11:29:35.000Z | 2022-02-21T11:29:35.000Z | procgen/env.py | k4ntz/procgen | dca9c99379ba1f68573d035b0c6522f11c726808 | [
"MIT"
] | null | null | null | procgen/env.py | k4ntz/procgen | dca9c99379ba1f68573d035b0c6522f11c726808 | [
"MIT"
] | null | null | null | import os
import random
from typing import Sequence, Optional, List
import gym3
from gym3.libenv import CEnv
import numpy as np
from .builder import build
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
MAX_STATE_SIZE = 2 ** 20
ENV_NAMES = [
"bigfish",
"bossfight",
"caveflyer",
"chaser",
... | 29.652985 | 195 | 0.558324 |
795eff05a252571aa71d49334a1522ecc7d90ba5 | 255 | py | Python | inbm/packaging/pyinstaller-hooks/hook-future.standard_library.py | ahameedx/intel-inb-manageability | aca445fa4cef0b608e6e88e74476547e10c06073 | [
"Apache-2.0"
] | 5 | 2021-12-13T21:19:31.000Z | 2022-01-18T18:29:43.000Z | inbm/packaging/pyinstaller-hooks/hook-future.standard_library.py | ahameedx/intel-inb-manageability | aca445fa4cef0b608e6e88e74476547e10c06073 | [
"Apache-2.0"
] | 45 | 2021-12-30T17:21:09.000Z | 2022-03-29T22:47:32.000Z | inbm/packaging/pyinstaller-hooks/hook-future.standard_library.py | ahameedx/intel-inb-manageability | aca445fa4cef0b608e6e88e74476547e10c06073 | [
"Apache-2.0"
] | 4 | 2022-01-26T17:42:54.000Z | 2022-03-30T04:48:04.000Z | hiddenimports = [
'UserList',
'UserString',
'UserDict',
'itertools',
'collections',
'future.backports.misc',
'commands',
'base64',
'__builtin__',
'math',
'reprlib',
'functools',
're',
'subprocess',
] | 15.9375 | 28 | 0.529412 |
795eff839503530da5fdcbe93f5fbab7b1d10727 | 8,746 | py | Python | django/db/models/sql/where.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 7 | 2021-07-10T14:32:29.000Z | 2021-07-10T16:14:09.000Z | virtual/lib/python3.6/site-packages/django/db/models/sql/where.py | kahenya-anita/Insta-Clone | 4894e959c17170505e73aee6dc497aeb29d55a71 | [
"MIT"
] | 61 | 2021-01-10T12:59:01.000Z | 2021-06-24T09:19:20.000Z | virtual/lib/python3.6/site-packages/django/db/models/sql/where.py | kahenya-anita/Insta-Clone | 4894e959c17170505e73aee6dc497aeb29d55a71 | [
"MIT"
] | 27 | 2021-11-10T08:44:10.000Z | 2022-03-30T08:19:46.000Z | """
Code to manage the creation and SQL rendering of 'where' constraints.
"""
from django.core.exceptions import EmptyResultSet
from django.utils import tree
from django.utils.functional import cached_property
# Connection types
AND = 'AND'
OR = 'OR'
class WhereNode(tree.Node):
"""
An SQL WHERE clause.
... | 35.124498 | 106 | 0.609421 |
795f006eafe7d1111b0c0ff1c6e2be4b5d19c611 | 1,204 | py | Python | tests/utils/get_message_integration_tests.py | jdgillespie91/trackerSpend | 1b8a6d6a8cf99cad3006118035a8ff3c54a4fcb6 | [
"MIT"
] | 3 | 2015-07-16T14:35:23.000Z | 2015-12-16T23:14:48.000Z | tests/utils/get_message_integration_tests.py | jdgillespie91/trackerSpend | 1b8a6d6a8cf99cad3006118035a8ff3c54a4fcb6 | [
"MIT"
] | null | null | null | tests/utils/get_message_integration_tests.py | jdgillespie91/trackerSpend | 1b8a6d6a8cf99cad3006118035a8ff3c54a4fcb6 | [
"MIT"
] | 5 | 2016-06-13T11:14:35.000Z | 2020-11-13T00:15:22.000Z | import amqp
import unittest
from utils import get_message
class GetMessageIntegrationTests(unittest.TestCase):
def setUp(self):
self.queue = 'test_queue'
self.msg = amqp.Message('test_message')
self.connection = amqp.Connection()
self.channel = self.connection.channel()
sel... | 35.411765 | 88 | 0.740864 |
795f017d70156cd48e416468756c67f930a6596a | 14,182 | py | Python | models/oracle.py | BlackBoxOperator/GotchaTheNames | a90691910b42d8a168ab3dc6e8edd08c4f349214 | [
"MIT"
] | 7 | 2020-08-16T13:27:47.000Z | 2021-09-29T03:53:14.000Z | models/oracle.py | BlackBoxOperator/GotchaTheNames | a90691910b42d8a168ab3dc6e8edd08c4f349214 | [
"MIT"
] | null | null | null | models/oracle.py | BlackBoxOperator/GotchaTheNames | a90691910b42d8a168ab3dc6e8edd08c4f349214 | [
"MIT"
] | 3 | 2021-03-15T03:40:00.000Z | 2021-10-09T13:57:39.000Z | #!/usr/bin/env python3.6
# coding: utf-8
from tqdm import *
import numpy as np
import time, os, json, csv, re, sys
import shutil
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.... | 33.29108 | 98 | 0.589691 |
795f027dbf0580a133b7ad59e1a239856d651e2d | 5,265 | py | Python | src/sage/dev/test/user_interface.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | null | null | null | src/sage/dev/test/user_interface.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | null | null | null | src/sage/dev/test/user_interface.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | 1 | 2020-07-24T12:20:37.000Z | 2020-07-24T12:20:37.000Z | r"""
Command line user interface for doctesting
This module provides :class:`DoctestUserInterface`, an implementation of a
:class:`sage.dev.user_interface.UserInterface` on the command line which can be
used for (non-interactive) doctesting.
AUTHORS:
- Julian Rueth: initial version
"""
#****************************... | 39 | 166 | 0.59886 |
795f057012fc654901659cb5876207a88be44890 | 3,319 | py | Python | thumbor/filters/frame.py | jairhenrique/thumbor | fa29ba0efab2dd420c6840616a079756fd75293a | [
"MIT"
] | null | null | null | thumbor/filters/frame.py | jairhenrique/thumbor | fa29ba0efab2dd420c6840616a079756fd75293a | [
"MIT"
] | null | null | null | thumbor/filters/frame.py | jairhenrique/thumbor | fa29ba0efab2dd420c6840616a079756fd75293a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
from thumbor.ext.filters import _nine_patch
from thumbor.filters imp... | 31.609524 | 84 | 0.620669 |
795f06a1fd0fd0c9ed1d61759ae37bca28e7ce79 | 1,529 | py | Python | ferminet/utils/units.py | AllanChain/ferminet | 75dc8475e2aa479484d601cc6819bc7e9f577058 | [
"Apache-2.0"
] | null | null | null | ferminet/utils/units.py | AllanChain/ferminet | 75dc8475e2aa479484d601cc6819bc7e9f577058 | [
"Apache-2.0"
] | null | null | null | ferminet/utils/units.py | AllanChain/ferminet | 75dc8475e2aa479484d601cc6819bc7e9f577058 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019 DeepMind Technologies Limited. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
#... | 31.204082 | 74 | 0.763244 |
795f0716fb888aaf186543779c5a9779e1d3c229 | 3,805 | py | Python | bentoml/deployment/sagemaker/templates.py | awesome-archive/BentoML | 9a1d21a014ab11dc235ddf878d590ec7c496f291 | [
"Apache-2.0"
] | null | null | null | bentoml/deployment/sagemaker/templates.py | awesome-archive/BentoML | 9a1d21a014ab11dc235ddf878d590ec7c496f291 | [
"Apache-2.0"
] | null | null | null | bentoml/deployment/sagemaker/templates.py | awesome-archive/BentoML | 9a1d21a014ab11dc235ddf878d590ec7c496f291 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Atalaya Tech, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, ... | 29.269231 | 111 | 0.657819 |
795f0960aa19dd2856ff52c1b210c00329607c6b | 2,849 | py | Python | habitat/reporting/migrations/0002_sociodynamicreport_sociodynamicreportentry.py | matrach/habitatOS | 1ae2a3caf6f279cf6d6d20bcd81f24d50f61d7d3 | [
"MIT"
] | 1 | 2021-02-01T19:04:39.000Z | 2021-02-01T19:04:39.000Z | habitat/reporting/migrations/0002_sociodynamicreport_sociodynamicreportentry.py | matrach/habitatOS | 1ae2a3caf6f279cf6d6d20bcd81f24d50f61d7d3 | [
"MIT"
] | null | null | null | habitat/reporting/migrations/0002_sociodynamicreport_sociodynamicreportentry.py | matrach/habitatOS | 1ae2a3caf6f279cf6d6d20bcd81f24d50f61d7d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-08 21:38
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import habitat.timezone.models.martian_standard_time
class Migration(migrations.Migration):
... | 55.862745 | 203 | 0.654616 |
795f0a20f88f0038232572d67b611114386c885f | 4,536 | py | Python | create_dems/oly/oly_align.py | elischwat/hsfm-geomorph | ddd7cd8a5434d04fef9cab7f16f15e7efde868c8 | [
"MIT"
] | null | null | null | create_dems/oly/oly_align.py | elischwat/hsfm-geomorph | ddd7cd8a5434d04fef9cab7f16f15e7efde868c8 | [
"MIT"
] | null | null | null | create_dems/oly/oly_align.py | elischwat/hsfm-geomorph | ddd7cd8a5434d04fef9cab7f16f15e7efde868c8 | [
"MIT"
] | 1 | 2020-12-22T06:25:46.000Z | 2020-12-22T06:25:46.000Z | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.5.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
import hsfm
import os
import fiona
import rasterio
from... | 32.633094 | 135 | 0.676808 |
795f0ad3a1679c1bd73533d2946050e3106152fc | 1,018 | py | Python | kubernetes_asyncio/test/test_v1_component_status_list.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_v1_component_status_list.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_v1_component_status_list.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.13.5
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... | 25.45 | 124 | 0.739686 |
795f0b00b9856212bcc91a9e83df69a5bce52cd6 | 4,998 | bzl | Python | third_party/repo.bzl | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 54 | 2017-06-17T14:07:48.000Z | 2022-03-29T02:11:20.000Z | third_party/repo.bzl | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 19 | 2021-12-28T12:44:55.000Z | 2022-01-13T08:11:28.000Z | third_party/repo.bzl | wainshine/tensorflow | dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d | [
"Apache-2.0"
] | 11 | 2018-04-19T22:36:01.000Z | 2021-08-02T08:44:43.000Z | # Copyright 2017 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 applicab... | 37.298507 | 82 | 0.654662 |
795f0b58e5c392fffcaf1ed64227fc7810049255 | 968 | py | Python | setup.py | siqialex/mx-theme | 2a7608c26de68193d58c9e92a7691ab66778ddba | [
"MIT"
] | null | null | null | setup.py | siqialex/mx-theme | 2a7608c26de68193d58c9e92a7691ab66778ddba | [
"MIT"
] | null | null | null | setup.py | siqialex/mx-theme | 2a7608c26de68193d58c9e92a7691ab66778ddba | [
"MIT"
] | null | null | null | from setuptools import setup
from mxtheme import __version__
setup(
name = 'mxtheme',
version = __version__,
author = 'Mu Li',
author_email= 'mli@amazon.com',
url="https://github.com/mli/mx-theme",
description='MXNet Website Theme, adapted from Sphinx Material Design Theme',
packa... | 30.25 | 82 | 0.592975 |
795f0c711f6254f3e48a3ee15118e24d6d9c4b7c | 2,024 | py | Python | server/tasks/migrations/0001_initial.py | jagdamba/task-manager | 532ff3ed10e549683a77ac6d6af224ff361956ff | [
"MIT"
] | null | null | null | server/tasks/migrations/0001_initial.py | jagdamba/task-manager | 532ff3ed10e549683a77ac6d6af224ff361956ff | [
"MIT"
] | null | null | null | server/tasks/migrations/0001_initial.py | jagdamba/task-manager | 532ff3ed10e549683a77ac6d6af224ff361956ff | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2021-01-03 11:15
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 44 | 185 | 0.624506 |
795f0cd7416fec5aeec3fe60c2d9bb30c1fe7bbf | 6,759 | py | Python | jiant/shared/initialization.py | Inujal/jiant | 095fd4ab7613fe270fd7b7c64b00a90b32b18b5b | [
"MIT"
] | null | null | null | jiant/shared/initialization.py | Inujal/jiant | 095fd4ab7613fe270fd7b7c64b00a90b32b18b5b | [
"MIT"
] | null | null | null | jiant/shared/initialization.py | Inujal/jiant | 095fd4ab7613fe270fd7b7c64b00a90b32b18b5b | [
"MIT"
] | null | null | null | import json
import numpy as np
import os
import random
import time
import torch
from dataclasses import dataclass
from typing import Any
import jiant.utils.python.io as py_io
import jiant.utils.zlog as zlog
@dataclass
class QuickInitContainer:
device: Any
n_gpu: int
log_writer: Any
def quick_init(args,... | 34.136364 | 100 | 0.694925 |
795f0d30312f747d5d386e870d04eb47264e0a4a | 16,626 | py | Python | core/controllers/community_dashboard_test.py | vinayakvvg/oppia | 37e1ffba18c35f3dee4090ff41887f2b776b7ec8 | [
"Apache-2.0"
] | 2 | 2019-03-31T07:03:32.000Z | 2019-04-24T18:12:53.000Z | core/controllers/community_dashboard_test.py | vinayakvvg/oppia | 37e1ffba18c35f3dee4090ff41887f2b776b7ec8 | [
"Apache-2.0"
] | 3 | 2020-03-16T06:40:30.000Z | 2020-03-30T12:10:20.000Z | core/controllers/community_dashboard_test.py | vinayakvvg/oppia | 37e1ffba18c35f3dee4090ff41887f2b776b7ec8 | [
"Apache-2.0"
] | 1 | 2020-03-15T14:29:55.000Z | 2020-03-15T14:29:55.000Z | # Copyright 2019 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 41.565 | 80 | 0.614519 |
795f0efc848e388c6f35f4d5c59a1351b7c79bd8 | 1,052 | py | Python | tests/models.py | patowc/django-encrypted-field | ffe02eab39a85dc988d1330e673ff7b22c4056b1 | [
"MIT"
] | null | null | null | tests/models.py | patowc/django-encrypted-field | ffe02eab39a85dc988d1330e673ff7b22c4056b1 | [
"MIT"
] | null | null | null | tests/models.py | patowc/django-encrypted-field | ffe02eab39a85dc988d1330e673ff7b22c4056b1 | [
"MIT"
] | null | null | null | from django.db import models
from encrypted_field import EncryptedField
from encrypted_field.fields import (
ALGORITHM_CHACHA20,
ALGORITHM_SALSA20,
ALGORITHM_AES_GCM,
ALGORITHM_AES_SIV,
ALGORITHM_AES_EAX,
ALGORITHM_AES_CCM,
ALGORITHM_AES_OCB
)
class MyModel(models.Model):
seed = Encryp... | 21.916667 | 80 | 0.777567 |
795f1023548b896d8ecf23eead008b7a21ffd937 | 143 | py | Python | IFSensor/api/v1/group.py | andrevdl/IFSensor | f77059f7e0c49e3ba39a524a6918206d203153b9 | [
"MIT"
] | null | null | null | IFSensor/api/v1/group.py | andrevdl/IFSensor | f77059f7e0c49e3ba39a524a6918206d203153b9 | [
"MIT"
] | null | null | null | IFSensor/api/v1/group.py | andrevdl/IFSensor | f77059f7e0c49e3ba39a524a6918206d203153b9 | [
"MIT"
] | null | null | null | from flask.views import MethodView
class GroupAPI(MethodView):
def get(self, group_id):
return {"id": group_id, "name": "Binnen"} | 28.6 | 50 | 0.678322 |
795f1070b593d066f40d9bac9259a21bffc53d54 | 506 | py | Python | 19_classes/01_intro.py | maornesimi/python-course-examples | f2e606f142a9d331075db73fd451c4418dba45ed | [
"MIT"
] | 2 | 2016-07-06T08:47:01.000Z | 2019-12-15T05:09:24.000Z | 19_classes/01_intro.py | maornesimi/python-course-examples | f2e606f142a9d331075db73fd451c4418dba45ed | [
"MIT"
] | 143 | 2016-10-14T07:33:55.000Z | 2018-11-06T19:13:52.000Z | 19_classes/01_intro.py | maornesimi/python-course-examples | f2e606f142a9d331075db73fd451c4418dba45ed | [
"MIT"
] | 43 | 2016-10-13T15:49:47.000Z | 2019-09-10T09:14:52.000Z | """
1. Class syntax
2. Passing parameters to methods and constructor
3. Object vs. Class variables/methods
4. Private members
"""
class Light(object):
def __init__(self, val=False):
self._on = val
def lights_on(self):
if not self._on:
print "Lights on"
self._on = True
... | 16.322581 | 48 | 0.590909 |
795f12266fb440b587619f249285d1ca5d7a68da | 3,577 | py | Python | homeassistant/components/vizio/const.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 2 | 2019-11-20T20:56:59.000Z | 2021-01-03T08:52:18.000Z | homeassistant/components/vizio/const.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 5 | 2020-04-26T10:50:01.000Z | 2021-03-16T21:19:46.000Z | homeassistant/components/vizio/const.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 1 | 2020-03-07T10:43:50.000Z | 2020-03-07T10:43:50.000Z | """Constants used by vizio component."""
from pyvizio import VizioAsync
from pyvizio.const import (
DEVICE_CLASS_SPEAKER as VIZIO_DEVICE_CLASS_SPEAKER,
DEVICE_CLASS_TV as VIZIO_DEVICE_CLASS_TV,
)
import voluptuous as vol
from homeassistant.components.media_player import DEVICE_CLASS_SPEAKER, DEVICE_CLASS_TV
fr... | 32.518182 | 89 | 0.675426 |
795f128d587a776fb974fbbf7303d69d228bd80c | 79 | py | Python | oldsite/bc/config/dev.py | jugovich/teresajugovich | efae0d2a0060ed864aec6e0180106717a01d80d2 | [
"MIT"
] | null | null | null | oldsite/bc/config/dev.py | jugovich/teresajugovich | efae0d2a0060ed864aec6e0180106717a01d80d2 | [
"MIT"
] | null | null | null | oldsite/bc/config/dev.py | jugovich/teresajugovich | efae0d2a0060ed864aec6e0180106717a01d80d2 | [
"MIT"
] | null | null | null | ENV = 'dev'
ADMINS = (('Michael Jugovich', 'jugovich@gmail.com'))
DEBUG = True | 19.75 | 53 | 0.658228 |
795f142d15122b69a2b70d99109801ffb98e369f | 3,341 | py | Python | examples/kasios/kasios.py | bkj/sgm | 65e7f932042c9d3a2f8e14b7a55dc1b217371f32 | [
"MIT"
] | 7 | 2019-02-14T12:34:08.000Z | 2021-04-23T07:49:05.000Z | examples/kasios/kasios.py | bkj/sgm | 65e7f932042c9d3a2f8e14b7a55dc1b217371f32 | [
"MIT"
] | 2 | 2018-07-14T23:19:59.000Z | 2019-04-17T22:09:17.000Z | examples/kasios/kasios.py | bkj/sgm | 65e7f932042c9d3a2f8e14b7a55dc1b217371f32 | [
"MIT"
] | 5 | 2018-08-06T14:13:39.000Z | 2022-03-10T08:54:46.000Z | #!/usr/bin/env python
"""
sgm/examples/kasios/kasios.py
"""
import warnings
warnings.filterwarnings("ignore", module="scipy.sparse")
import sys
import json
import argparse
import numpy as np
from time import time
from scipy import sparse
from sgm import factory as sgm_factory
# --
# Helpers
def load_data():
... | 25.120301 | 97 | 0.598324 |
795f1462031dde2b0e1a647d4f2117fb69e80a7c | 4,002 | py | Python | numbas_lti/consumers.py | oscarsiles/numbas-lti-provider | ef7080a2593a800a1b9630c746e4f8667e2ec42d | [
"Apache-2.0"
] | null | null | null | numbas_lti/consumers.py | oscarsiles/numbas-lti-provider | ef7080a2593a800a1b9630c746e4f8667e2ec42d | [
"Apache-2.0"
] | null | null | null | numbas_lti/consumers.py | oscarsiles/numbas-lti-provider | ef7080a2593a800a1b9630c746e4f8667e2ec42d | [
"Apache-2.0"
] | null | null | null | from django.http import HttpResponse
from channels.handler import AsgiHandler
from channels import Group
from channels.sessions import channel_session
from channels.auth import http_session_user, channel_session_user, channel_session_user_from_http
from channels.generic import BaseConsumer
from channels.generic.w... | 36.054054 | 98 | 0.725887 |
795f159fa4802c1d31ea65ae384b000ac26d01f2 | 80 | py | Python | test/test_record_input.py | beesandbombs/coldtype | d02c7dd36bf1576fa37dc8c50d5c1a6e47b1c5ea | [
"Apache-2.0"
] | 1 | 2021-04-04T15:25:06.000Z | 2021-04-04T15:25:06.000Z | test/test_record_input.py | beesandbombs/coldtype | d02c7dd36bf1576fa37dc8c50d5c1a6e47b1c5ea | [
"Apache-2.0"
] | null | null | null | test/test_record_input.py | beesandbombs/coldtype | d02c7dd36bf1576fa37dc8c50d5c1a6e47b1c5ea | [
"Apache-2.0"
] | null | null | null | from coldtype import *
@renderable()
def render(f):
return DATPen().oval(f) | 16 | 27 | 0.6875 |
795f16bb99f5552872f34e233c1bd8f78e494b24 | 3,895 | py | Python | inaugralproject/inauguralproject.py | NumEconCopenhagen/Suggested-Solutions-2021 | 1f5189a3c398251993fd9c58e0ec4a9ec13ccaae | [
"MIT"
] | null | null | null | inaugralproject/inauguralproject.py | NumEconCopenhagen/Suggested-Solutions-2021 | 1f5189a3c398251993fd9c58e0ec4a9ec13ccaae | [
"MIT"
] | 1 | 2021-03-25T09:00:08.000Z | 2021-03-25T09:00:08.000Z | inaugralproject/inauguralproject.py | NumEconCopenhagen/Suggested-Solutions-2021 | 1f5189a3c398251993fd9c58e0ec4a9ec13ccaae | [
"MIT"
] | 5 | 2021-05-17T11:34:18.000Z | 2022-03-24T14:05:36.000Z | import numpy as np
from scipy import optimize
def u_func(c, h, mp):
""" Calculates utility of chosen (consumption, housing) bundle.
Args:
c (float): consumption
h (float): housing
mp (dict): model parameters.
Returns:
(float): utility of bundle
"""
return (c**(1-mp['phi']))*(h... | 22.911765 | 106 | 0.572272 |
795f1731ab84fbcc50043cb1496542d28400d94f | 9,950 | py | Python | src/Infraestructura/clusterEndpoint/databases/commandsDatabaseConnector.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | 3 | 2017-09-03T22:01:35.000Z | 2019-01-10T05:40:44.000Z | src/web/CygnusCloud/modules/clusterEndpoint/databases/commandsDatabaseConnector.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | null | null | null | src/web/CygnusCloud/modules/clusterEndpoint/databases/commandsDatabaseConnector.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
'''
========================================================================
CygnusCloud
========================================================================
File: commandsDatabaseConnector.py
Version: 2.0
Description: commands ... | 42.887931 | 147 | 0.591156 |
795f179c5494db7eab668f12532c10a9e231d1b4 | 5,894 | py | Python | tests/test_gt3.py | gt-frc/gt3 | 1b27d6ca68b182413be23efeb0282f4a9075212f | [
"MIT"
] | 2 | 2018-10-10T00:11:19.000Z | 2020-12-08T20:15:16.000Z | tests/test_gt3.py | gt-frc/gt3 | 1b27d6ca68b182413be23efeb0282f4a9075212f | [
"MIT"
] | 25 | 2018-05-02T22:16:37.000Z | 2021-12-13T20:53:38.000Z | tests/test_gt3.py | gt-frc/gt3 | 1b27d6ca68b182413be23efeb0282f4a9075212f | [
"MIT"
] | 4 | 2018-06-06T16:07:20.000Z | 2021-12-03T11:46:23.000Z | #!/usr/bin/python
import unittest
import GT3
from tests.ShotBase import *
from matplotlib.axes._axes import Axes
from matplotlib.pyplot import Figure
class CommonFunctions(object):
"""Tests to see if a shot has the expected attributes typical for a fully run shot."""
def test_gt3_has_core(cls):
cls.... | 31.859459 | 90 | 0.613675 |
795f181a5d274d20de08331c6b23830947dd1b9e | 1,543 | py | Python | indra/tools/reading/starcluster_reading/process_reach_from_s3.py | pupster90/indra | e90b0bc1016fc2d210a9b46fb160b78a7d6a5ab9 | [
"BSD-2-Clause"
] | 2 | 2020-01-14T08:59:10.000Z | 2020-12-18T16:21:38.000Z | indra/tools/reading/starcluster_reading/process_reach_from_s3.py | pupster90/indra | e90b0bc1016fc2d210a9b46fb160b78a7d6a5ab9 | [
"BSD-2-Clause"
] | null | null | null | indra/tools/reading/starcluster_reading/process_reach_from_s3.py | pupster90/indra | e90b0bc1016fc2d210a9b46fb160b78a7d6a5ab9 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import sys
import pickle
import logging
from indra.sources import reach
from indra.literature import s3_client
if __name__ == '__main__':
usage = "Usage: %s pmid_list start_index end_index" % sys.argv[0]
if ... | 32.145833 | 78 | 0.6442 |
795f19095f54a6f5aada7f1db849656b01f5b87b | 5,140 | py | Python | test/api_rest/test_analysis.py | JohnnyPeng18/memsource-wrap | 5f7059be9555f77e515f0bec131809f034c71f3a | [
"MIT"
] | 9 | 2016-02-12T00:32:02.000Z | 2021-10-11T10:16:05.000Z | test/api_rest/test_analysis.py | JohnnyPeng18/memsource-wrap | 5f7059be9555f77e515f0bec131809f034c71f3a | [
"MIT"
] | 42 | 2015-01-07T07:31:14.000Z | 2019-12-10T05:32:51.000Z | test/api_rest/test_analysis.py | JohnnyPeng18/memsource-wrap | 5f7059be9555f77e515f0bec131809f034c71f3a | [
"MIT"
] | 9 | 2016-06-29T16:56:58.000Z | 2021-11-26T02:33:17.000Z | import requests
import unittest
from unittest.mock import patch, PropertyMock
from memsource import constants, models
from memsource.api_rest.analysis import Analysis
class TestAnalysis(unittest.TestCase):
@patch.object(requests.Session, "request")
def test_get(self, mock_request: unittest.mock):
moc... | 35.448276 | 93 | 0.519066 |
795f1993ba5c31bf5a26333f31f1bc73125bff07 | 8,125 | py | Python | tensorflow/contrib/distributions/python/kernel_tests/bijectors/sinh_arcsinh_bijector_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijectors/sinh_arcsinh_bijector_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijectors/sinh_arcsinh_bijector_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2017 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... | 42.317708 | 112 | 0.650585 |
795f19a57479f0732b335814d7e4925768e5cb3c | 5,209 | py | Python | src/streamlink/plugins/showroom.py | lijinquan123/streamlink | 1e0ff12f38df4879a704c11376b7e2a118a01e3b | [
"BSD-2-Clause"
] | 1 | 2021-05-09T22:00:40.000Z | 2021-05-09T22:00:40.000Z | src/streamlink/plugins/showroom.py | Inncee81/streamlink | 07029669d58a835bd05029316211343eef78ddf2 | [
"BSD-2-Clause"
] | 3 | 2020-04-07T18:40:42.000Z | 2020-09-23T15:43:18.000Z | src/streamlink/plugins/showroom.py | Inncee81/streamlink | 07029669d58a835bd05029316211343eef78ddf2 | [
"BSD-2-Clause"
] | 1 | 2021-05-09T22:00:43.000Z | 2021-05-09T22:00:43.000Z | import logging
import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream, RTMPStream
from streamlink.stream.hls import HLSStreamReader, HLSStreamWorker
log = logging.getLogger(__name__)
_url_re = re.compile(r'''^https?://
(?:\w*.)?
showr... | 29.765714 | 100 | 0.610866 |
795f1a2158f3ed69b93b9d05db17ac286eec8bb4 | 314 | py | Python | blog/migrations/0002_remove_post_category.py | kritebh/django-blog | 5b3d76e4b41735368169cbd7ef54f32c233160d4 | [
"Apache-2.0"
] | null | null | null | blog/migrations/0002_remove_post_category.py | kritebh/django-blog | 5b3d76e4b41735368169cbd7ef54f32c233160d4 | [
"Apache-2.0"
] | null | null | null | blog/migrations/0002_remove_post_category.py | kritebh/django-blog | 5b3d76e4b41735368169cbd7ef54f32c233160d4 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-26 15:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='post',
name='category',
),
]
| 17.444444 | 47 | 0.573248 |
795f1b00cd54ea8f1cf10f23c405bc6b0867dbbe | 879 | py | Python | NSDSubscription/urls.py | p76081158/kube5gnfvo | 3db5db51603f52b73fce7d9740980552836299c6 | [
"Apache-2.0"
] | 51 | 2020-02-26T09:42:02.000Z | 2021-11-18T04:16:48.000Z | NSDSubscription/urls.py | p76081158/kube5gnfvo | 3db5db51603f52b73fce7d9740980552836299c6 | [
"Apache-2.0"
] | 6 | 2020-05-22T02:54:24.000Z | 2022-03-26T06:14:55.000Z | NSDSubscription/urls.py | p76081158/kube5gnfvo | 3db5db51603f52b73fce7d9740980552836299c6 | [
"Apache-2.0"
] | 55 | 2020-01-08T09:47:52.000Z | 2022-02-04T12:55:05.000Z | # 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 agreed to ... | 35.16 | 78 | 0.746303 |
795f1b24013328729105c7386082a8b770b6cf02 | 419 | py | Python | tbx/core/migrations/0049_auto_20160819_1421.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 103 | 2015-02-24T17:58:21.000Z | 2022-03-23T08:08:58.000Z | tbx/core/migrations/0049_auto_20160819_1421.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 145 | 2015-01-13T17:13:43.000Z | 2022-03-29T12:56:20.000Z | tbx/core/migrations/0049_auto_20160819_1421.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 57 | 2015-01-03T12:00:37.000Z | 2022-02-09T13:11:30.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-08-19 13:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("torchbox", "0048_personpage_is_senior"),
]
operations = [
migrations.RemoveField(model_name="personindexpage", name="intro"... | 23.277778 | 88 | 0.673031 |
795f1c617185658bd0ca61751f52613ac6627910 | 9,801 | py | Python | kodistubs/docs/conf.py | ogero/Deluge-Manager-XBMC | 10c4f2a93ac1fffba01209444ba5e597036b968b | [
"MIT"
] | null | null | null | kodistubs/docs/conf.py | ogero/Deluge-Manager-XBMC | 10c4f2a93ac1fffba01209444ba5e597036b968b | [
"MIT"
] | null | null | null | kodistubs/docs/conf.py | ogero/Deluge-Manager-XBMC | 10c4f2a93ac1fffba01209444ba5e597036b968b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Kodistubs documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 08 14:30:41 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... | 31.616129 | 79 | 0.711764 |
795f1c86c2d5f91f9c9905ea9fa8a3195e4e11de | 745 | py | Python | 2020/day9.py | Bug38/AoC | 576ee0d3745242b71240a62c121c52bc92f7253e | [
"MIT"
] | null | null | null | 2020/day9.py | Bug38/AoC | 576ee0d3745242b71240a62c121c52bc92f7253e | [
"MIT"
] | null | null | null | 2020/day9.py | Bug38/AoC | 576ee0d3745242b71240a62c121c52bc92f7253e | [
"MIT"
] | null | null | null | import utils
data = utils.getIntsFromFile("day9.input")
preambleLenght = 25
# data = [35,20,15,25,47,40,62,55,65,95,102,117,150,182,127,219,299,277,309,576]
# preambleLenght = 5
def getsums(ints):
sums = []
for i in range(len(ints)-1):
for j in range(i+1, len(ints)):
sums.append(ints[i]+ints[j])
return sums
... | 24.032258 | 80 | 0.660403 |
795f1da60d1c9377ac6652d91b1f82775b063886 | 7,100 | py | Python | lib/datasets/voc_eval.py | debidatta/py-faster-rcnn | d148cdea491bfc67e94f3ce1f78893884992c9a2 | [
"BSD-2-Clause"
] | null | null | null | lib/datasets/voc_eval.py | debidatta/py-faster-rcnn | d148cdea491bfc67e94f3ce1f78893884992c9a2 | [
"BSD-2-Clause"
] | null | null | null | lib/datasets/voc_eval.py | debidatta/py-faster-rcnn | d148cdea491bfc67e94f3ce1f78893884992c9a2 | [
"BSD-2-Clause"
] | null | null | null | # --------------------------------------------------------
# Fast/er R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Bharath Hariharan
# --------------------------------------------------------
import xml.etree.ElementTree as ET
import os
import cPickle
import numpy as np
def parse_rec(f... | 34.975369 | 78 | 0.526761 |
795f1db75b3162ba377043472dad5bd99fc396a7 | 951 | py | Python | Python 3/schulnoten.py | gabrielwolf/5-python-kurse | cabc2b6706f6f384963c026749fd39eb042736c6 | [
"MIT"
] | null | null | null | Python 3/schulnoten.py | gabrielwolf/5-python-kurse | cabc2b6706f6f384963c026749fd39eb042736c6 | [
"MIT"
] | null | null | null | Python 3/schulnoten.py | gabrielwolf/5-python-kurse | cabc2b6706f6f384963c026749fd39eb042736c6 | [
"MIT"
] | null | null | null | import locale
locale.setlocale(locale.LC_ALL, 'de_DE')
print ('''
Hallo! Mit diesem Script kannst du aus deiner Note (0.0 bis 1.0)
den englischen Grade (A, B, C, D, F) berechnen!
''')
def warnungAusgeben(text):
print ('\n\033[91m' + text + '\033[37m\n')
note = 0 # Eintritt in die Schleife
while note >= 0 or n... | 22.642857 | 84 | 0.584648 |
795f1dfac8ab0be43d34cc5fa245ce03573c2063 | 26,586 | py | Python | src/sage/structure/sequence.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2018-09-11T11:16:26.000Z | 2019-09-10T15:26:37.000Z | src/sage/structure/sequence.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 2 | 2018-10-30T13:40:20.000Z | 2020-07-23T12:13:30.000Z | src/sage/structure/sequence.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 1 | 2020-07-23T10:29:58.000Z | 2020-07-23T10:29:58.000Z | r"""
Finite Homogenous Sequences
A mutable sequence of elements with a common guaranteed category,
which can be set immutable.
Sequence derives from list, so has all the functionality of lists and
can be used wherever lists are used. When a sequence is created
without explicitly given the common universe of the elem... | 30.074661 | 160 | 0.545663 |
795f1e43b0fe8f7907b6a87fffebdcbeea538da7 | 22 | py | Python | hello_world.py | paleblueweb/profiles-rest-api | ec3c81c19f3778dfafc4861db2cda00ccbaa3df3 | [
"MIT"
] | null | null | null | hello_world.py | paleblueweb/profiles-rest-api | ec3c81c19f3778dfafc4861db2cda00ccbaa3df3 | [
"MIT"
] | 1 | 2022-02-28T03:05:30.000Z | 2022-02-28T03:05:30.000Z | hello_world.py | paleblueweb/profiles-rest-api | ec3c81c19f3778dfafc4861db2cda00ccbaa3df3 | [
"MIT"
] | null | null | null | print ('hello world')
| 11 | 21 | 0.681818 |
795f1eaf2a7420bd92202a13b56abfe54b796cc2 | 842 | py | Python | authors/apps/notify/urls.py | andela/Ah-backend-valkyrie | f0eb64c27e1fe37d5c81e4b9a8762dcf3c336a79 | [
"BSD-3-Clause"
] | null | null | null | authors/apps/notify/urls.py | andela/Ah-backend-valkyrie | f0eb64c27e1fe37d5c81e4b9a8762dcf3c336a79 | [
"BSD-3-Clause"
] | 46 | 2019-01-08T13:16:41.000Z | 2021-04-30T20:47:08.000Z | authors/apps/notify/urls.py | andela/Ah-backend-valkyrie | f0eb64c27e1fe37d5c81e4b9a8762dcf3c336a79 | [
"BSD-3-Clause"
] | 3 | 2019-01-07T08:21:59.000Z | 2019-09-20T06:43:18.000Z | from django.urls import path
from authors.apps.notify.views import (
FetchMailListView, FetchUpdateMailList,
FetchAllNotifications, FetchAllUnReadNotifications,
FetchAllReadNotifications, MarkAllNotificationsAsRead
)
urlpatterns = [
path('mail_list', FetchMailListView.as_view(), name='mail-list'),
... | 36.608696 | 76 | 0.729216 |
795f1f82125706bcd44df03a5ae3304dee9f6c8c | 14,203 | py | Python | catalyst/callbacks/scheduler.py | otherman16/catalyst | ccef2c7de7ff3869523a86f291b6a2390308bad5 | [
"Apache-2.0"
] | 1 | 2020-11-14T13:35:22.000Z | 2020-11-14T13:35:22.000Z | catalyst/callbacks/scheduler.py | otherman16/catalyst | ccef2c7de7ff3869523a86f291b6a2390308bad5 | [
"Apache-2.0"
] | null | null | null | catalyst/callbacks/scheduler.py | otherman16/catalyst | ccef2c7de7ff3869523a86f291b6a2390308bad5 | [
"Apache-2.0"
] | null | null | null | from typing import List, Optional, Tuple, TYPE_CHECKING, Union
from abc import ABC, abstractmethod
import torch
from catalyst.contrib.nn.schedulers import BatchScheduler, OneCycleLRWithWarmup
from catalyst.core.callback import Callback, CallbackNode, CallbackOrder
from catalyst.utils.misc import get_attr
from catalys... | 30.676026 | 79 | 0.577624 |
795f22b4ee637d71b98fb48e47cda5a745039f9b | 7,775 | py | Python | src/dataset.py | escorciav/ndsb | bac6bd68e0d34492de0c2646706485de95c1210f | [
"MIT"
] | null | null | null | src/dataset.py | escorciav/ndsb | bac6bd68e0d34492de0c2646706485de95c1210f | [
"MIT"
] | null | null | null | src/dataset.py | escorciav/ndsb | bac6bd68e0d34492de0c2646706485de95c1210f | [
"MIT"
] | null | null | null | import glob
import os
import tempfile
import caffe
import numpy as np
from skimage.color import gray2rgb
from skimage.io import imread, imsave
from skimage.transform import resize, rotate
from skimage.util import pad
from sklearn.cross_validation import StratifiedKFold
#TODO: Create a tuple with (img_list, img_labels... | 31.864754 | 79 | 0.649904 |
795f22c6ca54672a66870f3401ccf907a75e5bda | 1,196 | py | Python | airflow/contrib/operators/slack_webhook_operator.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | null | null | null | airflow/contrib/operators/slack_webhook_operator.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | 1 | 2019-05-14T14:32:40.000Z | 2019-05-14T14:32:40.000Z | airflow/contrib/operators/slack_webhook_operator.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 39.866667 | 95 | 0.770903 |
795f2313119d8110a56102da7509404a2cb61813 | 616 | py | Python | objax/util/__init__.py | parmarsuraj99/objax | 111cd78960f5812885505b5ec02552b98a789973 | [
"Apache-2.0"
] | 2 | 2021-02-23T18:23:40.000Z | 2022-03-09T09:38:37.000Z | objax/util/__init__.py | parmarsuraj99/objax | 111cd78960f5812885505b5ec02552b98a789973 | [
"Apache-2.0"
] | null | null | null | objax/util/__init__.py | parmarsuraj99/objax | 111cd78960f5812885505b5ec02552b98a789973 | [
"Apache-2.0"
] | 1 | 2020-09-20T23:56:29.000Z | 2020-09-20T23:56:29.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.235294 | 74 | 0.75974 |
795f231a3997209be40813663ace48587554116f | 1,009 | py | Python | 103.binary-tree-zigzag-level-order-traversal.py | leonhx/leetcode-practice | 35fabe5a1b98c05a5dd5d6a62201e9cb54be69ec | [
"MIT"
] | null | null | null | 103.binary-tree-zigzag-level-order-traversal.py | leonhx/leetcode-practice | 35fabe5a1b98c05a5dd5d6a62201e9cb54be69ec | [
"MIT"
] | null | null | null | 103.binary-tree-zigzag-level-order-traversal.py | leonhx/leetcode-practice | 35fabe5a1b98c05a5dd5d6a62201e9cb54be69ec | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=103 lang=python3
#
# [103] Binary Tree Zigzag Level Order Traversal
#
# @lc code=start
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
... | 27.27027 | 66 | 0.527255 |
795f232fe714d5687058f56ef2b83e37f613ebda | 19,071 | py | Python | eggs/transaction-1.4.3-py2.7.egg/transaction/tests/test__manager.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | null | null | null | eggs/transaction-1.4.3-py2.7.egg/transaction/tests/test__manager.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | null | null | null | eggs/transaction-1.4.3-py2.7.egg/transaction/tests/test__manager.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2012 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 31.315271 | 80 | 0.609197 |
795f23e2ee2a452ae7847d2825c559c5a67442dd | 359 | py | Python | movie/migrations/0004_auto_20200409_2245.py | justnclrk/MCURanker | 97f946e75bb911a2073955c1ea66402da839d2ef | [
"MIT"
] | null | null | null | movie/migrations/0004_auto_20200409_2245.py | justnclrk/MCURanker | 97f946e75bb911a2073955c1ea66402da839d2ef | [
"MIT"
] | 6 | 2020-09-24T04:35:08.000Z | 2022-03-12T00:27:25.000Z | movie/migrations/0004_auto_20200409_2245.py | justnclrk/MCURanker | 97f946e75bb911a2073955c1ea66402da839d2ef | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-04-10 03:45
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('movie', '0003_auto_20200409_1502'),
]
operations = [
migrations.AlterModelOptions(
name='movie',
options={'ordering': ['rele... | 19.944444 | 60 | 0.593315 |
795f2428c5d49e3f0e32f2f721514e4865fba79f | 261 | py | Python | sopel_modules/rpg/__init__.py | deathbybandaid/Sopel-RPG | 87a7bba6e50bb41d34d5b7327ca21e61f98e2a3e | [
"EFL-2.0"
] | null | null | null | sopel_modules/rpg/__init__.py | deathbybandaid/Sopel-RPG | 87a7bba6e50bb41d34d5b7327ca21e61f98e2a3e | [
"EFL-2.0"
] | null | null | null | sopel_modules/rpg/__init__.py | deathbybandaid/Sopel-RPG | 87a7bba6e50bb41d34d5b7327ca21e61f98e2a3e | [
"EFL-2.0"
] | null | null | null | # coding=utf8
"""Sopel RPG
Sopel RPG is an IRC game with complexity
"""
from __future__ import unicode_literals, absolute_import, division, print_function
from .rpg import *
__author__ = 'Sam Zick'
__email__ = 'sam@deathbybandaid.net'
__version__ = '0.1.0'
| 18.642857 | 82 | 0.754789 |
795f243999c82059849d5d9443346995bef5c092 | 7,974 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vcenter_license.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-29T18:41:01.000Z | 2020-03-29T18:41:01.000Z | ansible/ansible/modules/cloud/vmware/vcenter_license.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/modules/cloud/vmware/vcenter_license.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-03-22T01:04:48.000Z | 2020-03-22T01:04:48.000Z | #!/usr/bin/python
# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 34.076923 | 130 | 0.6308 |
795f2484626b97a8e272167b0981197b6bf98784 | 1,980 | py | Python | atcoder/ahc001/a.py | sugitanishi/competitive-programming | 51af65fdce514ece12f8afbf142b809d63eefb5d | [
"MIT"
] | null | null | null | atcoder/ahc001/a.py | sugitanishi/competitive-programming | 51af65fdce514ece12f8afbf142b809d63eefb5d | [
"MIT"
] | null | null | null | atcoder/ahc001/a.py | sugitanishi/competitive-programming | 51af65fdce514ece12f8afbf142b809d63eefb5d | [
"MIT"
] | null | null | null | #☆𝒐𝒎𝒂𝒋𝒊𝒏𝒂𝒊☆#
import sys
import math
import itertools
from functools import lru_cache
from collections import deque
import time
import random
sys.setrecursionlimit(10000000)
input=lambda : sys.stdin.readline().rstrip()
'''''✂'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
FIELD_LEN = 10000
def make_sq... | 28.285714 | 79 | 0.494444 |
795f24e20dc68572ee9f623ca4e05f55010d9de1 | 8,011 | py | Python | train_ae.py | crazy-zxx/3d-lmnet-update | 7739fbfaedc59828378f233f53f3a919f8f0e328 | [
"MIT"
] | null | null | null | train_ae.py | crazy-zxx/3d-lmnet-update | 7739fbfaedc59828378f233f53f3a919f8f0e328 | [
"MIT"
] | null | null | null | train_ae.py | crazy-zxx/3d-lmnet-update | 7739fbfaedc59828378f233f53f3a919f8f0e328 | [
"MIT"
] | null | null | null | from importer import *
parser = argparse.ArgumentParser()
parser.add_argument('--data_dir_pcl', type=str, required=True,
help='Path to shapenet pointclouds')
parser.add_argument('--exp', type=str, required=True,
help='Name of Experiment')
parser.add_argument('--gpu', type=str, required=True,
help='GPU to use')
... | 33.801688 | 157 | 0.720135 |
795f2666546118610132550292a6358dd85cd935 | 2,003 | py | Python | Regression/Multiple Linear Regression/Avoid Dummy Variable Trap/notebook.py | World-of-ML-AI/Machine-learning-a-to-z | 07c1dbb0b5f7d356c7674c3989103041b5f51f9d | [
"MIT"
] | 1 | 2021-12-13T21:12:30.000Z | 2021-12-13T21:12:30.000Z | Regression/Multiple Linear Regression/Avoid Dummy Variable Trap/notebook.py | World-of-ML-AI/Machine-learning-a-to-z | 07c1dbb0b5f7d356c7674c3989103041b5f51f9d | [
"MIT"
] | null | null | null | Regression/Multiple Linear Regression/Avoid Dummy Variable Trap/notebook.py | World-of-ML-AI/Machine-learning-a-to-z | 07c1dbb0b5f7d356c7674c3989103041b5f51f9d | [
"MIT"
] | null | null | null | # Multiple Linear Regression
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('50_Startups.csv')
X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, -1].values
print(X)
# Encoding categorical data
from sklearn.compose imp... | 35.767857 | 97 | 0.732901 |
795f2701cad81fa95be8381754be675144d5cb86 | 939 | py | Python | python3/tests/test_T.py | blackelk/hell | 4bb72b2efcb8c83396a95fb6b75c169e2d2315cd | [
"MIT"
] | 2 | 2017-10-01T16:50:37.000Z | 2019-07-03T21:19:09.000Z | python3/tests/test_T.py | blackelk/hell | 4bb72b2efcb8c83396a95fb6b75c169e2d2315cd | [
"MIT"
] | 3 | 2020-03-31T03:04:38.000Z | 2021-11-15T17:48:34.000Z | python3/tests/test_T.py | blackelk/hell | 4bb72b2efcb8c83396a95fb6b75c169e2d2315cd | [
"MIT"
] | null | null | null | from termcolor import colored
from hell import T
from conftest import capture_out
t = capture_out(T)
def test_arg():
assert t('') == colored("<class 'str'>\n")
assert t(1) == colored("<class 'int'>\n")
def test_c():
assert t(object, c='green') == colored("<class 'type'>\n", 'green')
assert t(type... | 22.902439 | 91 | 0.561235 |
795f2774cd8bae4983cebe2728ecc0ef91c0f7da | 14,058 | py | Python | physical_validation/tests/test_ensemble_regression.py | shirtsgroup/physical_validation | 2af444e849ae64a99e25f87b4e4b17dea24a747c | [
"MIT"
] | 26 | 2018-04-02T18:47:14.000Z | 2022-02-16T04:13:50.000Z | physical_validation/tests/test_ensemble_regression.py | shirtsgroup/physical_validation | 2af444e849ae64a99e25f87b4e4b17dea24a747c | [
"MIT"
] | 151 | 2018-03-03T02:43:36.000Z | 2022-03-02T16:20:19.000Z | physical_validation/tests/test_ensemble_regression.py | shirtsgroup/physical_validation | 2af444e849ae64a99e25f87b4e4b17dea24a747c | [
"MIT"
] | 18 | 2018-04-20T15:55:47.000Z | 2021-08-20T08:54:15.000Z | ###########################################################################
# #
# physical_validation, #
# a python package to test the physical validity of MD results #
# ... | 33.956522 | 91 | 0.654645 |
795f281f1f690ef5184cfb694869ba9585c8d86c | 1,010 | py | Python | src/main/python/models/provider.py | federueda/ASW | 92babb574f1e9f1168e16ca77e69ddad02cd6b0b | [
"MIT"
] | null | null | null | src/main/python/models/provider.py | federueda/ASW | 92babb574f1e9f1168e16ca77e69ddad02cd6b0b | [
"MIT"
] | 9 | 2020-01-31T21:00:10.000Z | 2021-10-21T18:35:41.000Z | src/main/python/models/provider.py | federueda/ASW | 92babb574f1e9f1168e16ca77e69ddad02cd6b0b | [
"MIT"
] | 1 | 2020-01-20T12:41:50.000Z | 2020-01-20T12:41:50.000Z | class Provider:
#Provider class will describe the objects of providers already registered
#by the company in its system, through a read of a .CSV file. After reading
#this file, the provider that is not in this list will not be recognized
# as REGISTERED PROVIDER when scoring the quotations
def __init__(self,Pro... | 34.827586 | 90 | 0.784158 |
795f282b13087fdc53d39437c34d0b4732f77ddf | 4,510 | py | Python | kubernetes_asyncio/client/models/extensions_v1beta1_id_range.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/extensions_v1beta1_id_range.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/extensions_v1beta1_id_range.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.15.9
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 29.477124 | 124 | 0.585588 |
795f2833f3cf3635dca9e261c788f66bb1e33882 | 1,978 | py | Python | public/api/rainbowbox/metaheuristic_optimizer/test/plot_func.py | gaoussoucamara/simens-cerpad | c3aece80c519c4d662db091abfccbc0b63f23405 | [
"BSD-3-Clause"
] | 17 | 2021-01-08T10:35:04.000Z | 2022-03-23T07:13:54.000Z | Artificial Feeding Birds/test/plot_func.py | shahind/Nature-Inspired-Algorithms | 88cfc37f903bfb3840566257f2d818ac5534affe | [
"MIT"
] | 2 | 2018-02-15T13:31:13.000Z | 2018-10-17T15:01:40.000Z | Artificial Feeding Birds/test/plot_func.py | shahind/Nature-Inspired-Algorithms | 88cfc37f903bfb3840566257f2d818ac5534affe | [
"MIT"
] | 5 | 2021-01-11T08:31:07.000Z | 2022-01-11T06:28:04.000Z | # -*- coding: utf-8 -*-
# Metaheuristic_Optimizer
# Copyright (C) 2016-2017 Jean-Baptiste LAMY
# LIMICS (Laboratoire d'informatique médicale et d'ingénierie des connaissances en santé), UMR_S 1142
# University Paris 13, Sorbonne paris-Cité, Bobigny, France
# This program is free software: you can redistribute it and/o... | 35.963636 | 101 | 0.659757 |
795f283e61866eee3728ebd429d19352ae63522d | 98 | py | Python | tabla/tabla/simulation/__init__.py | ziqingzeng/public | 4102b3bd42f43b49cf74599492d52d4f755ab7b2 | [
"BSD-3-Clause"
] | 6 | 2021-04-20T06:33:25.000Z | 2022-02-24T06:46:13.000Z | tabla/tabla/simulation/__init__.py | ziqingzeng/public | 4102b3bd42f43b49cf74599492d52d4f755ab7b2 | [
"BSD-3-Clause"
] | 3 | 2021-04-20T04:28:51.000Z | 2021-05-24T05:14:31.000Z | tabla/tabla/simulation/__init__.py | ziqingzeng/public | 4102b3bd42f43b49cf74599492d52d4f755ab7b2 | [
"BSD-3-Clause"
] | 4 | 2021-04-08T16:38:46.000Z | 2021-04-30T05:51:30.000Z | from collections import namedtuple
Data = namedtuple('Data', ['value', 'rel_pe_id', 'abs_pe_id'])
| 32.666667 | 62 | 0.734694 |
795f29732080213d198145af5d9289b50d7424fa | 696 | py | Python | review/utilities.py | yazdanv/backend | 49da8d46e108bc2000fdabc1b991836f2cc50687 | [
"MIT"
] | 2 | 2021-06-11T21:41:05.000Z | 2021-06-16T03:58:16.000Z | review/utilities.py | AienTech/backend | a1c73e781e571e4a3ec0bc9598df44ccd876cf3c | [
"MIT"
] | null | null | null | review/utilities.py | AienTech/backend | a1c73e781e571e4a3ec0bc9598df44ccd876cf3c | [
"MIT"
] | 1 | 2021-05-10T04:40:22.000Z | 2021-05-10T04:40:22.000Z | from review.models import CompanyReview
def salary_handler(salary, salary_type, resp=False):
if resp:
if salary_type == CompanyReview.YEAR:
return salary * 12
elif salary_type == CompanyReview.MONTH:
return salary
elif salary_type == CompanyReview.DAY:
r... | 27.84 | 52 | 0.577586 |
795f2fd5ff5e27f37b8b9a5aac88129ebaa4ca22 | 2,496 | py | Python | det/plugins/tcp_ipv6.py | lokiuox/DET | 10e32be5e719d99a8bb9b213a88ccef7feef6751 | [
"MIT"
] | null | null | null | det/plugins/tcp_ipv6.py | lokiuox/DET | 10e32be5e719d99a8bb9b213a88ccef7feef6751 | [
"MIT"
] | null | null | null | det/plugins/tcp_ipv6.py | lokiuox/DET | 10e32be5e719d99a8bb9b213a88ccef7feef6751 | [
"MIT"
] | null | null | null | from binascii import hexlify, unhexlify
import socket
import sys
from random import choice
if not socket.has_ipv6:
raise Exception("the local machine has no IPv6 support enabled")
config = None
app_exfiltrate = None
def send(data):
if 'proxies' in config and config['proxies'] != [""]:
targets = [conf... | 34.666667 | 115 | 0.669071 |
795f30442efb4ff8c3ba5a232e44b2ee62335b28 | 1,602 | py | Python | rapid7_tcell/komand_rapid7_tcell/triggers/get_events/trigger.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | rapid7_tcell/komand_rapid7_tcell/triggers/get_events/trigger.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | rapid7_tcell/komand_rapid7_tcell/triggers/get_events/trigger.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
import time
from .schema import GetEventsInput, GetEventsOutput
# Custom imports below
from datetime import datetime
from komand.helper import clean
class GetEvents(komand.Trigger):
def __init__(self):
super(self.__class__, self).__init__(
name='get_events',
... | 32.693878 | 76 | 0.529963 |
795f30688f70f5e2f9523780fa85541cea66e82e | 7,499 | py | Python | vnpy/trader/app/optionMaster/omDate.py | black0144/vnpy | 0d0ea30dad14a0150f7500ff9a62528030321426 | [
"MIT"
] | 5 | 2019-01-17T12:14:14.000Z | 2021-05-30T10:24:42.000Z | vnpy/trader/app/optionMaster/omDate.py | black0144/vnpy | 0d0ea30dad14a0150f7500ff9a62528030321426 | [
"MIT"
] | 1 | 2018-06-12T10:08:24.000Z | 2018-06-12T10:08:24.000Z | vnpy/trader/app/optionMaster/omDate.py | black0144/vnpy | 0d0ea30dad14a0150f7500ff9a62528030321426 | [
"MIT"
] | 5 | 2019-03-26T03:17:45.000Z | 2019-11-05T08:08:18.000Z | # encoding: UTF-8
"""用于处理周末和节假日,以计算交易日的组件"""
from __future__ import division
import csv
import datetime
import sys
import os
from collections import OrderedDict
from vnpy.trader.uiQt import QtCore, QtWidgets, QtGui
# 常量定义
ANNUAL_TRADINGDAYS = 240
CALENDAR_FILENAME = 'TradingCalendar.csv'
PATH = os.path.abspath(o... | 29.407843 | 95 | 0.469796 |
795f30958a523d0ef9f76cb36918671ced4071ca | 1,022 | py | Python | tma/collector/sse.py | hebpmo/TMA | b07747d3112e822ff92dd2ba4589d2288adab154 | [
"MIT"
] | 2 | 2020-02-15T18:31:39.000Z | 2020-03-18T13:30:58.000Z | tma/collector/sse.py | hebpmo/TMA | b07747d3112e822ff92dd2ba4589d2288adab154 | [
"MIT"
] | null | null | null | tma/collector/sse.py | hebpmo/TMA | b07747d3112e822ff92dd2ba4589d2288adab154 | [
"MIT"
] | 1 | 2021-02-13T19:14:39.000Z | 2021-02-13T19:14:39.000Z | # -*- coding: UTF-8 -*-
"""
collector.sse - 采集上海证券交易所的数据
官网:http://www.sse.com.cn/
====================================================================
"""
import requests
import pandas as pd
def get_sh_indexes():
"""获取上海证券交易所所有指数的实时行情"""
url = "http://www.sse.com.cn/js/common/indexQuotes.js"
res = req... | 24.926829 | 94 | 0.494129 |
795f317c600627be3a426085f7383ad89830017e | 3,252 | py | Python | DQMOffline/Configuration/python/autoDQM.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQMOffline/Configuration/python/autoDQM.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQMOffline/Configuration/python/autoDQM.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | autoDQM = { 'common' : ['DQMOfflineCommon',
'PostDQMOffline',
'DQMHarvestCommon+DQMCertCommon'],
'commonSiStripZeroBias' : ['DQMOfflineCommonSiStripZeroBias',
'PostDQMOffline',
'DQMH... | 49.272727 | 89 | 0.439114 |
795f335fe4d95d1689a3b6a0699cb3f7f6eb70f3 | 11,413 | py | Python | datasets/wikiann/wikiann.py | zidingz/datasets | 02edd9ebc79f715adb1c718d1439fda83dc356f1 | [
"Apache-2.0"
] | 2 | 2021-08-28T06:48:02.000Z | 2021-08-28T23:18:34.000Z | datasets/wikiann/wikiann.py | zidingz/datasets | 02edd9ebc79f715adb1c718d1439fda83dc356f1 | [
"Apache-2.0"
] | 8 | 2021-10-01T12:00:18.000Z | 2021-10-08T18:50:05.000Z | datasets/wikiann/wikiann.py | zidingz/datasets | 02edd9ebc79f715adb1c718d1439fda83dc356f1 | [
"Apache-2.0"
] | 1 | 2021-09-26T03:08:27.000Z | 2021-09-26T03:08:27.000Z | # coding=utf-8
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | 29.114796 | 902 | 0.519495 |
795f33c18cd892012447685d6eee50cbb0909d69 | 7,793 | py | Python | kubernetes/client/models/v1_lease_spec.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_lease_spec.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_lease_spec.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 33.161702 | 179 | 0.636982 |
795f350528b37166da80b48ff5533b6bc0f61bfe | 895 | py | Python | opencv/object_tracking.py | aliakbar09a/Practising_CV_using_opencv-python | ed797d4a29ae16aeec5f833c32a94b10cf92ffe7 | [
"MIT"
] | null | null | null | opencv/object_tracking.py | aliakbar09a/Practising_CV_using_opencv-python | ed797d4a29ae16aeec5f833c32a94b10cf92ffe7 | [
"MIT"
] | null | null | null | opencv/object_tracking.py | aliakbar09a/Practising_CV_using_opencv-python | ed797d4a29ae16aeec5f833c32a94b10cf92ffe7 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while(1):
ret, frame = cap.read()
lower_blue = np.array([110,50,50])
upper_blue = np.array([130,255,255])
lower_red = np.array([-10,100,100])
upper_red = np.array([10,255,255])
lower_green = np.array([50,100,100])
upper_green = np.ar... | 27.121212 | 52 | 0.644693 |
795f361ef50deb90767e9bed96ad8b23059720fa | 32,469 | py | Python | nova/virt/hyperv/vmutils.py | bopopescu/nested_quota_final | 7c3454883de9f5368fa943924540eebe157a319d | [
"Apache-2.0"
] | 5 | 2017-06-23T07:37:39.000Z | 2020-10-21T07:07:50.000Z | nova/virt/hyperv/vmutils.py | bopopescu/nested_quota_final | 7c3454883de9f5368fa943924540eebe157a319d | [
"Apache-2.0"
] | null | null | null | nova/virt/hyperv/vmutils.py | bopopescu/nested_quota_final | 7c3454883de9f5368fa943924540eebe157a319d | [
"Apache-2.0"
] | 4 | 2017-06-23T07:37:43.000Z | 2020-12-28T09:57:22.000Z | # Copyright (c) 2010 Cloud.com, Inc
# Copyright 2012 Cloudbase Solutions Srl / Pedro Navarro Perez
# 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
#
# ... | 42.498691 | 79 | 0.624319 |
795f37203c121d18ce4363229d74363b44b01bfa | 12,982 | py | Python | 05-data_acquisition/telegram_bot/echo_bot/myvenv/lib/python3.8/site-packages/telegram/constants.py | sachinpr0001/data_science | d028233ff7bbcbbb6b26f01806d1c5ccf788df9a | [
"MIT"
] | null | null | null | 05-data_acquisition/telegram_bot/echo_bot/myvenv/lib/python3.8/site-packages/telegram/constants.py | sachinpr0001/data_science | d028233ff7bbcbbb6b26f01806d1c5ccf788df9a | [
"MIT"
] | null | null | null | 05-data_acquisition/telegram_bot/echo_bot/myvenv/lib/python3.8/site-packages/telegram/constants.py | sachinpr0001/data_science | d028233ff7bbcbbb6b26f01806d1c5ccf788df9a | [
"MIT"
] | null | null | null | # python-telegram-bot - a Python interface to the Telegram Bot API
# Copyright (C) 2015-2021
# by the python-telegram-bot contributors <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free ... | 34.253298 | 96 | 0.703821 |
795f375396503a1d6bd74bf1354b262fe7357956 | 618 | py | Python | database/database.py | jerin/smart-steel-task | 5b9d2054cd3ac53dfafc5771d41cc6ec4c324a0c | [
"MIT"
] | 1 | 2020-01-21T04:49:54.000Z | 2020-01-21T04:49:54.000Z | database/database.py | jerin/smart-steel-task | 5b9d2054cd3ac53dfafc5771d41cc6ec4c324a0c | [
"MIT"
] | null | null | null | database/database.py | jerin/smart-steel-task | 5b9d2054cd3ac53dfafc5771d41cc6ec4c324a0c | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import (scoped_session, sessionmaker)
from sqlalchemy_searchable import make_searchable
from sqlalchemy.orm import configure_mappers
from config import Config
engine = create_engine(Config.SQLALCHEMY_DATABA... | 38.625 | 58 | 0.744337 |
795f3891ca1bc582c72d1db060f82b11c3817356 | 1,848 | py | Python | clapbot/users/forms.py | alexrudy/ClapBot | fc6149cbd20b8afd6ffd3d5c7a4836100a509215 | [
"MIT"
] | 2 | 2017-05-04T18:33:51.000Z | 2017-05-04T18:34:17.000Z | clapbot/users/forms.py | alexrudy/ClapBot | fc6149cbd20b8afd6ffd3d5c7a4836100a509215 | [
"MIT"
] | 2 | 2020-05-26T23:50:43.000Z | 2021-03-26T21:39:30.000Z | clapbot/users/forms.py | alexrudy/ClapBot | fc6149cbd20b8afd6ffd3d5c7a4836100a509215 | [
"MIT"
] | null | null | null | import logging
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField, HiddenField
from wtforms.validators import DataRequired, Email, EqualTo, ValidationError
from .model import User, UserStatus
logger = logging.getLogger(__name__)
class LoginForm(FlaskForm):
"... | 46.2 | 99 | 0.712121 |
795f396c88bb38f667ef3aa7674b0cc3ae1ac763 | 101 | py | Python | main.py | juanmpy05/ping-pong-pygame | 1ba78b8934af05c038804979e60a8b253f7075bd | [
"MIT"
] | null | null | null | main.py | juanmpy05/ping-pong-pygame | 1ba78b8934af05c038804979e60a8b253f7075bd | [
"MIT"
] | null | null | null | main.py | juanmpy05/ping-pong-pygame | 1ba78b8934af05c038804979e60a8b253f7075bd | [
"MIT"
] | null | null | null | from game import Game
def main():
juego = Game()
juego.start()
if __name__ == '__main__':
main() | 12.625 | 26 | 0.653465 |
795f3acbf341b2210f81e83418cd5c68c17759be | 3,378 | py | Python | scripts/auto_segment.py | ferayebend/sciaudio | 2d76e3e20476951da248184e6c550cf39fe995a1 | [
"Apache-2.0"
] | 1 | 2018-05-17T21:45:43.000Z | 2018-05-17T21:45:43.000Z | scripts/auto_segment.py | ferayebend/sciaudio | 2d76e3e20476951da248184e6c550cf39fe995a1 | [
"Apache-2.0"
] | null | null | null | scripts/auto_segment.py | ferayebend/sciaudio | 2d76e3e20476951da248184e6c550cf39fe995a1 | [
"Apache-2.0"
] | null | null | null | import os, sys
from math import ceil
from sciaudio import audioSegmentation as aS
from sciaudio import audioBasicIO
from optparse import OptionParser
from datetime import datetime, timedelta
import yaml
def getSegmentAnnotations(options):
audio_file_path = options.audio
if not options.smoothWindow:
... | 36.717391 | 120 | 0.648609 |
795f3aefe1c46ed7ba11fad02a791546b7ce8434 | 1,070 | py | Python | isi_sdk_8_1_0/test/test_ndmp_settings_preferred_ip_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_0/test/test_ndmp_settings_preferred_ip_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_0/test/test_ndmp_settings_preferred_ip_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 5
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_1_0
from i... | 26.097561 | 131 | 0.751402 |
795f3b7b7641467910ebdaf916f78e3d0722d4a5 | 5,202 | py | Python | monai/networks/nets/regressor.py | ntenenz/MONAI | e7bdea0934ad08ef47de183eaa558942962fbaf4 | [
"Apache-2.0"
] | 2 | 2020-06-23T16:03:45.000Z | 2020-06-25T05:30:45.000Z | monai/networks/nets/regressor.py | ntenenz/MONAI | e7bdea0934ad08ef47de183eaa558942962fbaf4 | [
"Apache-2.0"
] | null | null | null | monai/networks/nets/regressor.py | ntenenz/MONAI | e7bdea0934ad08ef47de183eaa558942962fbaf4 | [
"Apache-2.0"
] | 1 | 2020-09-14T13:16:01.000Z | 2020-09-14T13:16:01.000Z | # Copyright 2020 MONAI Consortium
# 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... | 41.616 | 118 | 0.673203 |
795f3be9c2859ccf26b85fb101478b41b6cb5b4c | 5,787 | py | Python | pcapparser/printer.py | abzcoding/pcap-parser | 09ef92e08547141637eff62b8a5b64f6d23e945d | [
"BSD-3-Clause"
] | 5 | 2015-09-17T08:17:42.000Z | 2021-11-09T08:21:03.000Z | pcapparser/printer.py | abzcoding/pcap-parser | 09ef92e08547141637eff62b8a5b64f6d23e945d | [
"BSD-3-Clause"
] | null | null | null | pcapparser/printer.py | abzcoding/pcap-parser | 09ef92e08547141637eff62b8a5b64f6d23e945d | [
"BSD-3-Clause"
] | 4 | 2016-09-18T07:13:12.000Z | 2021-08-30T16:15:50.000Z | from __future__ import unicode_literals, print_function, division
from io import StringIO
import sys
from pcapparser.config import OutputLevel
# print http req/resp
from pcapparser import utils, six
from pcapparser import config
import threading
from pcapparser.constant import Compress
printer_lock = threading.Lock(... | 37.335484 | 100 | 0.574909 |
795f3cc3997c1e0bbe94ca482f7b917ce1ceedb2 | 2,629 | py | Python | Python/tdw/FBOutput/AudioSources.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | Python/tdw/FBOutput/AudioSources.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | Python/tdw/FBOutput/AudioSources.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: FBOutput
import tdw.flatbuffers
class AudioSources(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsAudioSources(cls, buf, offset):
n = tdw.flatbuffers.encode.Get(tdw.flatbuffers.packer.uoffset, b... | 38.661765 | 149 | 0.665272 |
795f3ce087ca8b16addb2f5b11a0a39abb37afb3 | 10,799 | py | Python | tests/controllers/test_relays.py | SmithSamuelM/didery | 8181cd2dd2aa711d0b559acdc8ba1c7e2e8ba2fb | [
"Apache-2.0"
] | null | null | null | tests/controllers/test_relays.py | SmithSamuelM/didery | 8181cd2dd2aa711d0b559acdc8ba1c7e2e8ba2fb | [
"Apache-2.0"
] | null | null | null | tests/controllers/test_relays.py | SmithSamuelM/didery | 8181cd2dd2aa711d0b559acdc8ba1c7e2e8ba2fb | [
"Apache-2.0"
] | null | null | null | '''
Tests can be run from the terminal with the following command:
pytest tests/controllers
To see test coverage install pytest-cov with pip then run this command:
py.test --cov-report term-missing --cov=src/didery/controllers/ tests/controllers/
'''
import falcon
try:
import simplejson as... | 26.598522 | 113 | 0.655431 |
795f3da7a36cf9b7d4e38ea175062ad4014c7c28 | 2,636 | py | Python | hangman/game.py | dylancruse/itp-u4-c2-hangman-game | e83dc9fc1d04e8930cbb3f951412e649adff9dc7 | [
"MIT"
] | null | null | null | hangman/game.py | dylancruse/itp-u4-c2-hangman-game | e83dc9fc1d04e8930cbb3f951412e649adff9dc7 | [
"MIT"
] | null | null | null | hangman/game.py | dylancruse/itp-u4-c2-hangman-game | e83dc9fc1d04e8930cbb3f951412e649adff9dc7 | [
"MIT"
] | null | null | null | from .exceptions import *
import random
# Complete with your own, just for fun :)
LIST_OF_WORDS = ['Cats', 'Swimming', 'Music', 'Reddit', 'Zelda']
def _get_random_word(list_of_words):
if not list_of_words:
raise InvalidListOfWordsException("List cannot be empty")
return random.choice(list_of_words)
... | 28.967033 | 78 | 0.679818 |
795f3dd4ae7c01c60d66fe0ad4d6208c08e91df5 | 3,260 | py | Python | backend/settings.py | Yogi1994/django-rest-custom-user-auth | 0b4e5a547abcb996082291ad54b514095680eb68 | [
"MIT"
] | null | null | null | backend/settings.py | Yogi1994/django-rest-custom-user-auth | 0b4e5a547abcb996082291ad54b514095680eb68 | [
"MIT"
] | null | null | null | backend/settings.py | Yogi1994/django-rest-custom-user-auth | 0b4e5a547abcb996082291ad54b514095680eb68 | [
"MIT"
] | null | null | null | """
Django settings for backend project.
Generated by 'django-admin startproject' using Django 1.11.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | 25.46875 | 91 | 0.698466 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.