hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e098241d28e098853efa7bbedd7a883dd13ccfd5 | 17,454 | py | Python | _notebooks/overview_helpers.py | kant/covid19-dashboard | 5195e3ae4fe08eb9a726f3e2a3124646390ae1a2 | [
"Apache-2.0"
] | null | null | null | _notebooks/overview_helpers.py | kant/covid19-dashboard | 5195e3ae4fe08eb9a726f3e2a3124646390ae1a2 | [
"Apache-2.0"
] | 5 | 2020-04-04T14:24:42.000Z | 2022-02-26T07:02:00.000Z | _notebooks/overview_helpers.py | kant/covid19-dashboard | 5195e3ae4fe08eb9a726f3e2a3124646390ae1a2 | [
"Apache-2.0"
] | null | null | null | import os
from urllib import request
import pandas as pd
data_folder = (os.path.join(os.path.dirname(__file__), 'data_files')
if '__file__' in locals() else 'data_files')
class SourceData:
df_mappings = pd.read_csv(os.path.join(data_folder, 'mapping_countries.csv'))
mappings = {'replace.coun... | 40.875878 | 118 | 0.609259 |
b27801fedad6b0c2dd7b27decd1ddeded2f7dcb7 | 2,154 | py | Python | flod_tilskudd_portal/flod_tilskudd_portal/api/tilskudd_api.py | Trondheim-kommune/Tilskuddsbasen | 4f8ce270ef7296069f8e43bfb4bf6a570a7a35d4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | flod_tilskudd_portal/flod_tilskudd_portal/api/tilskudd_api.py | Trondheim-kommune/Tilskuddsbasen | 4f8ce270ef7296069f8e43bfb4bf6a570a7a35d4 | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2021-03-31T18:23:12.000Z | 2021-12-13T19:43:12.000Z | flod_tilskudd_portal/flod_tilskudd_portal/api/tilskudd_api.py | Trondheim-kommune/Tilskuddsbasen | 4f8ce270ef7296069f8e43bfb4bf6a570a7a35d4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import traceback
from flask import current_app, request
from flask.ext.restful import Api, output_json
from flod_common.outputs.output_csv import output_csv
from flod_common.outputs.output_pdf import output_pdf
class TilskuddApi(Api):
def __init__(self, *args, **kwargs):
... | 33.65625 | 96 | 0.546425 |
38803440f292cc429313a8e8b28009295cfabc4f | 5,550 | py | Python | unchaind/mapper/siggy.py | xnlfgh/unchaind | af59c380c02401a7ac58139d7f82507b9fb59f75 | [
"MIT"
] | 2 | 2019-01-02T20:43:50.000Z | 2019-01-28T10:15:13.000Z | unchaind/mapper/siggy.py | xnlfgh/unchaind | af59c380c02401a7ac58139d7f82507b9fb59f75 | [
"MIT"
] | 40 | 2018-12-26T16:20:57.000Z | 2019-03-31T13:47:32.000Z | unchaind/mapper/siggy.py | xnlfgh/unchaind | af59c380c02401a7ac58139d7f82507b9fb59f75 | [
"MIT"
] | 4 | 2018-12-25T22:53:51.000Z | 2021-02-20T19:54:51.000Z | """Contains pollers for various EVE Online wormhole space mappers. These
pollers provide the means to authenticate and fetch information about
their current state online, then map that state onto an internal
Universe representation.
They also allow for callbacks when changes occur in their internal state."... | 31.896552 | 80 | 0.586667 |
743b39c8935112ff7b91736989d74339a1957d91 | 6,677 | py | Python | tests/contrib/sqlalchemy/mixins.py | soheltarir/dd-trace-py | 65864cea98e8b3602fee619cb8f5b749b5e70bb3 | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/sqlalchemy/mixins.py | soheltarir/dd-trace-py | 65864cea98e8b3602fee619cb8f5b749b5e70bb3 | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/sqlalchemy/mixins.py | soheltarir/dd-trace-py | 65864cea98e8b3602fee619cb8f5b749b5e70bb3 | [
"BSD-3-Clause"
] | null | null | null | # stdlib
import contextlib
# 3rd party
from nose.tools import eq_, ok_
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import (
create_engine,
Column,
Integer,
String,
)
# project
from ddtrace.contrib.sqlalchemy import trace_engine
# te... | 32.412621 | 111 | 0.628426 |
7dd0f569785eb88096b507ee04eef023b8d750ea | 22,451 | py | Python | mailpile/ui.py | JocelynDelalande/Mailpile | 3e53a54195a0dd8ca48e7cb3be44dd7b3acabd74 | [
"Apache-2.0"
] | null | null | null | mailpile/ui.py | JocelynDelalande/Mailpile | 3e53a54195a0dd8ca48e7cb3be44dd7b3acabd74 | [
"Apache-2.0"
] | null | null | null | mailpile/ui.py | JocelynDelalande/Mailpile | 3e53a54195a0dd8ca48e7cb3be44dd7b3acabd74 | [
"Apache-2.0"
] | null | null | null | #
# This file contains the UserInteraction and Session classes.
#
# The Session encapsulates settings and command results, allowing commands
# to be chanined in an interactive environment.
#
# The UserInteraction classes log the progress and performance of individual
# operations and assist with rendering the results i... | 33.913897 | 79 | 0.552047 |
bae744ad26de4fa115da5206e77a7e1b12426a93 | 518 | py | Python | AnalogLogger/parse.py | danielvilas/ArduinoCurrentMonitor | a3902d29ab4e4ffadf7fb4910950a60eeb16f57b | [
"MIT"
] | 1 | 2018-12-05T20:35:19.000Z | 2018-12-05T20:35:19.000Z | AnalogLogger/parse.py | danielvilas/ArduinoCurrentMonitor | a3902d29ab4e4ffadf7fb4910950a60eeb16f57b | [
"MIT"
] | null | null | null | AnalogLogger/parse.py | danielvilas/ArduinoCurrentMonitor | a3902d29ab4e4ffadf7fb4910950a60eeb16f57b | [
"MIT"
] | null | null | null | import struct
from matplotlib import pyplot as plt
import numpy as np
time=[]
a0=[]
a1=[]
with open("myfile", "rb") as f:
bytes = f.read(8)
while bytes:
#t0=bytes[0]<<24+bytes[1]<<16+bytes[2]<<8+bytes[3]
data=struct.unpack('>IHH',bytes)
print(data)
time.append(data[0])
... | 17.862069 | 58 | 0.588803 |
623f0957c3ec902e2d793fb6f525595aa6f56928 | 2,630 | py | Python | alps/docs.py | michalporeba/alps-py | bfbfd048437e1fb77d253bc649d3965257dd557c | [
"MIT"
] | null | null | null | alps/docs.py | michalporeba/alps-py | bfbfd048437e1fb77d253bc649d3965257dd557c | [
"MIT"
] | null | null | null | alps/docs.py | michalporeba/alps-py | bfbfd048437e1fb77d253bc649d3965257dd557c | [
"MIT"
] | null | null | null | from diogi.functions import *
class Doc:
# href, format, tag
def __init__(
self, href: str = None, format: str = None, tag: str = None, value: str = None
):
self.href = href
self.format = format
self.tag = tag
self.value = value
def as_data(self):
data ... | 29.550562 | 88 | 0.565399 |
e82b5dd4f6d257bb38d921ee592707269fd5b432 | 4,406 | py | Python | archiveOldVersions/commonFunctions_v09.py | remichartier/014_selfDrivingCarND_BehavioralCloningProject | 1dcaa7c5a937929d4481e5efbf7ccc856c04c4ff | [
"MIT"
] | 1 | 2021-02-23T08:28:54.000Z | 2021-02-23T08:28:54.000Z | archiveOldVersions/commonFunctions_v09.py | remichartier/014_selfDrivingCarND_BehavioralCloningProject | 1dcaa7c5a937929d4481e5efbf7ccc856c04c4ff | [
"MIT"
] | null | null | null | archiveOldVersions/commonFunctions_v09.py | remichartier/014_selfDrivingCarND_BehavioralCloningProject | 1dcaa7c5a937929d4481e5efbf7ccc856c04c4ff | [
"MIT"
] | null | null | null | import os
import csv
import cv2
import numpy as np # for np.array() np.append()
from datetime import datetime # print timestamps
# for loss history visualization image
import matplotlib; matplotlib.use('agg')
import matplotlib.pyplot as plt
from scipy import ndimage
# list of common functions
# from commonFunctions... | 34.968254 | 224 | 0.69655 |
5828553283257f99b070710485710b33e99af795 | 623 | py | Python | fairy_chess/config.py | ratopythonista/fairy-chess-backend | 2eb3a43ea896160a38c69c42be81c0dc5506bba3 | [
"MIT"
] | null | null | null | fairy_chess/config.py | ratopythonista/fairy-chess-backend | 2eb3a43ea896160a38c69c42be81c0dc5506bba3 | [
"MIT"
] | null | null | null | fairy_chess/config.py | ratopythonista/fairy-chess-backend | 2eb3a43ea896160a38c69c42be81c0dc5506bba3 | [
"MIT"
] | null | null | null | import os
PGSQL_DB = os.environ.get('PGSQL_DB', 'annamae')
PGSQL_HOST = os.environ.get('PGSQL_HOST', 'localhost')
PGSQL_PASS = os.environ.get('PGSQL_PASS', 'annamae')
PGSQL_PORT = os.environ.get('PGSQL_PORT', '5432')
PGSQL_USR = os.environ.get('PGSQL_USR', 'annamae')
EMAIL_PASS = os.environ.get('EMAIL_PASS', None)
#... | 32.789474 | 82 | 0.747994 |
bea4c12415ea9151219c025c89651f0b061d83c5 | 6,250 | py | Python | tests/contrib/operators/test_mssql_to_gcs_operator.py | fxdmhtt/airflow | cf88f7bc7bbd3e9bf110e98f025759a96c130235 | [
"Apache-2.0"
] | 3 | 2019-03-28T05:59:39.000Z | 2019-10-03T22:05:25.000Z | tests/contrib/operators/test_mssql_to_gcs_operator.py | fxdmhtt/airflow | cf88f7bc7bbd3e9bf110e98f025759a96c130235 | [
"Apache-2.0"
] | 7 | 2019-03-27T07:58:14.000Z | 2020-02-12T17:42:33.000Z | tests/contrib/operators/test_mssql_to_gcs_operator.py | upjohnc/airflow-upjohn-k8s | caadbc1618d73e054de99138b0892cea3a9327c4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2017-06-19T19:55:47.000Z | 2020-10-10T00:49:20.000Z | # -*- 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
#... | 40.322581 | 86 | 0.6912 |
ca57288ce6908252259a0130159dab61f6b468d6 | 27,241 | py | Python | scipy/sparse/sparsetools/coo.py | tomspur/scipy | 5309706537dbd96e0409f890a20fc6f5badfbac3 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/sparsetools/coo.py | tomspur/scipy | 5309706537dbd96e0409f890a20fc6f5badfbac3 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/sparsetools/coo.py | tomspur/scipy | 5309706537dbd96e0409f890a20fc6f5badfbac3 | [
"BSD-3-Clause"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.10
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import... | 64.859524 | 119 | 0.671525 |
4ab58cde482e0395e718c66339e11d6124542284 | 11,195 | py | Python | mne_frequency_tagging/frequency_tagging.py | dominikwelke/mne-frequency-tagging | 4f08127b1d1bd766dbe5b89d214b2765e0a0d5a4 | [
"BSD-3-Clause"
] | null | null | null | mne_frequency_tagging/frequency_tagging.py | dominikwelke/mne-frequency-tagging | 4f08127b1d1bd766dbe5b89d214b2765e0a0d5a4 | [
"BSD-3-Clause"
] | null | null | null | mne_frequency_tagging/frequency_tagging.py | dominikwelke/mne-frequency-tagging | 4f08127b1d1bd766dbe5b89d214b2765e0a0d5a4 | [
"BSD-3-Clause"
] | null | null | null | """
module for analysis of neurophysiological data obtained with frequency-tagging methodology (visual or auditory).
Author: Dominik Welke <dominik.welke@web.de>
"""
import mne
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('seaborn')
# utils
def _make_montage(montage, verbose=False):
if montag... | 36.465798 | 119 | 0.636356 |
dda00a689eeacf518c30280bc222b87817a03609 | 1,210 | py | Python | app/main/serializers.py | Ubaidkhan06/recipe-api-project | 1b651083747059111027e7562543914f0fa0e8f5 | [
"MIT"
] | null | null | null | app/main/serializers.py | Ubaidkhan06/recipe-api-project | 1b651083747059111027e7562543914f0fa0e8f5 | [
"MIT"
] | null | null | null | app/main/serializers.py | Ubaidkhan06/recipe-api-project | 1b651083747059111027e7562543914f0fa0e8f5 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from core.models import Tag, Ingredient, Recipe
class TagSerializer(serializers.ModelSerializer):
"""Serializer for tag objects"""
class Meta:
model = Tag
fields = ('id', 'name')
read_only = ('id')
class IngredientSerializer(serializers.ModelS... | 25.744681 | 65 | 0.634711 |
7393c8a0939a6839d7708154fe2ef5f891d67ffa | 927 | py | Python | travel/docs/Amadeus-master/pactravel-master/python-client/test/test_carrier_meta.py | shopglobal/api | 176e1858d3f93e8e7854ba194698b6b9825841da | [
"CC-BY-4.0"
] | null | null | null | travel/docs/Amadeus-master/pactravel-master/python-client/test/test_carrier_meta.py | shopglobal/api | 176e1858d3f93e8e7854ba194698b6b9825841da | [
"CC-BY-4.0"
] | 1 | 2021-06-01T22:04:28.000Z | 2021-06-01T22:04:28.000Z | travel/docs/Amadeus-master/pactravel-master/python-client/test/test_carrier_meta.py | shopglobal/api | 176e1858d3f93e8e7854ba194698b6b9825841da | [
"CC-BY-4.0"
] | null | null | null | # coding: utf-8
"""
Amadeus Travel Innovation Sandbox
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 1.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
imp... | 20.6 | 105 | 0.700108 |
107f477fbe36b70665a89ac6e16a8597b4f9a95b | 2,301 | py | Python | djvue/views.py | abahnihi/djvue | 628e363297c676865aab28e83f04906d933540c0 | [
"MIT"
] | 13 | 2020-07-21T19:22:22.000Z | 2020-12-17T17:28:41.000Z | djvue/views.py | abahnihi/djvue | 628e363297c676865aab28e83f04906d933540c0 | [
"MIT"
] | 1 | 2021-01-26T11:37:38.000Z | 2021-01-26T11:37:38.000Z | djvue/views.py | abahnihi/djvue | 628e363297c676865aab28e83f04906d933540c0 | [
"MIT"
] | 3 | 2020-07-28T10:33:55.000Z | 2020-11-08T20:11:34.000Z | from rest_framework import status
from rest_framework.settings import api_settings
from rest_framework.response import Response
from rest_framework.views import APIView
from .serializers import FileUploadSerializer
class FileUploadView(APIView):
"""
Generic file upload view.
To be subclassed when differe... | 34.863636 | 88 | 0.672316 |
e88fd5974939ac756da6e43fc550e039bf368213 | 19,827 | py | Python | synapse/handlers/saml_handler.py | OttoHollmann/synapse | d6beabaec96ee99164e1cea644761a3b8ec7169c | [
"Apache-2.0"
] | null | null | null | synapse/handlers/saml_handler.py | OttoHollmann/synapse | d6beabaec96ee99164e1cea644761a3b8ec7169c | [
"Apache-2.0"
] | null | null | null | synapse/handlers/saml_handler.py | OttoHollmann/synapse | d6beabaec96ee99164e1cea644761a3b8ec7169c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# 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 require... | 37.129213 | 125 | 0.636859 |
ee32ef13c73ce5bbea54c7901838688701967e73 | 1,726 | py | Python | ggplot/geoms/geom_point.py | peckto/ggpy | 28f8998a4199d9434dd5f2ae3ea7127b423118e4 | [
"BSD-2-Clause"
] | null | null | null | ggplot/geoms/geom_point.py | peckto/ggpy | 28f8998a4199d9434dd5f2ae3ea7127b423118e4 | [
"BSD-2-Clause"
] | null | null | null | ggplot/geoms/geom_point.py | peckto/ggpy | 28f8998a4199d9434dd5f2ae3ea7127b423118e4 | [
"BSD-2-Clause"
] | null | null | null | from .geom import geom
import numpy as np
from ..utils import is_date
def _date_to_number(i):
return i.toordinal() + i.time().hour/24 + i.time().minute/1440 + i.time().second/86400
class geom_point(geom):
"""
Scatterplot of (x, y) coordinates
Parameters
----------
x:
x values for (x, ... | 28.295082 | 113 | 0.531866 |
1eaff9aada897c7025659c14730fbc6432148053 | 3,495 | py | Python | Problem_11.py | infdahai/PE_sol | 7764c639474df19f3f02ca5804819a1a74d8a723 | [
"MIT"
] | null | null | null | Problem_11.py | infdahai/PE_sol | 7764c639474df19f3f02ca5804819a1a74d8a723 | [
"MIT"
] | null | null | null | Problem_11.py | infdahai/PE_sol | 7764c639474df19f3f02ca5804819a1a74d8a723 | [
"MIT"
] | null | null | null | input_2 = '''08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 3... | 28.185484 | 72 | 0.530758 |
3aa36cafff536d8ddcf99750591af49d1416fe59 | 4,880 | py | Python | daq/docker_test.py | InBrewJ/daq | f3438146c7148bd570182821dec95f602a22c6c5 | [
"Apache-2.0"
] | null | null | null | daq/docker_test.py | InBrewJ/daq | f3438146c7148bd570182821dec95f602a22c6c5 | [
"Apache-2.0"
] | 20 | 2019-07-02T09:22:29.000Z | 2019-10-08T13:44:01.000Z | daq/docker_test.py | InBrewJ/daq | f3438146c7148bd570182821dec95f602a22c6c5 | [
"Apache-2.0"
] | 1 | 2019-08-19T12:38:28.000Z | 2019-08-19T12:38:28.000Z | """Module for running docker-container tests"""
import datetime
import logging
import os
from clib import docker_host
import wrappers
LOGGER = logging.getLogger('docker')
class DockerTest():
"""Class for running docker tests"""
IMAGE_NAME_FORMAT = 'daq/test_%s'
CONTAINER_PREFIX = 'daq'
def __init... | 39.674797 | 96 | 0.592008 |
7abba1cbe6883605a668397055b009d178e23cba | 4,756 | py | Python | phosphodisco/utils.py | ruggleslab/phosphodisco | 9e0861dd31f07fc3a161e285777092759bfea26b | [
"MIT"
] | null | null | null | phosphodisco/utils.py | ruggleslab/phosphodisco | 9e0861dd31f07fc3a161e285777092759bfea26b | [
"MIT"
] | 5 | 2021-10-05T21:03:00.000Z | 2021-12-07T19:22:03.000Z | phosphodisco/utils.py | ruggleslab/phosphodisco | 9e0861dd31f07fc3a161e285777092759bfea26b | [
"MIT"
] | null | null | null | import warnings
from typing import Iterable, Optional
from pandas import Series
import numpy as np
import pandas as pd
from sklearn.linear_model import RidgeCV
from statsmodels.stats.multitest import multipletests
from scipy.stats import pearsonr, spearmanr
def norm_line_to_residuals(
ph_line: Iterable,
... | 35.22963 | 110 | 0.697435 |
fcc8cd3bceb2b8c5606cf3c4a1aa4371216b38b4 | 2,584 | py | Python | redux/mods/api/Twitch.py | PanjaCo/Redux-Bot | 15f4410b3cff137785028b0df4e27258ecad1a04 | [
"MIT"
] | 1 | 2018-02-18T04:05:18.000Z | 2018-02-18T04:05:18.000Z | redux/mods/api/Twitch.py | iPanja/Redux-Bot | 15f4410b3cff137785028b0df4e27258ecad1a04 | [
"MIT"
] | null | null | null | redux/mods/api/Twitch.py | iPanja/Redux-Bot | 15f4410b3cff137785028b0df4e27258ecad1a04 | [
"MIT"
] | null | null | null | """ DOES NOT WORK --- Will be fixed in a future update"""
import discord, requests, json
from discord.ext import commands
import config
from pprint import pprint
class Twitch:
def __init__(self, bot, config):
self.bot = bot
self.config = config
self.headers = {'Authorization' : 'Client-ID... | 36.914286 | 96 | 0.602167 |
36b1fcafa736d399b2782d92eff20ff9806e542c | 1,908 | py | Python | Database/djangodatabase/penpals/migrations/0001_initial.py | yichenesia/newhacks-your-name | a905a4a9b513d12ed1f40089c5cf4b8403d9a4bd | [
"MIT"
] | null | null | null | Database/djangodatabase/penpals/migrations/0001_initial.py | yichenesia/newhacks-your-name | a905a4a9b513d12ed1f40089c5cf4b8403d9a4bd | [
"MIT"
] | null | null | null | Database/djangodatabase/penpals/migrations/0001_initial.py | yichenesia/newhacks-your-name | a905a4a9b513d12ed1f40089c5cf4b8403d9a4bd | [
"MIT"
] | 2 | 2020-11-08T05:34:20.000Z | 2020-11-17T20:16:09.000Z | # Generated by Django 3.1.3 on 2020-11-08 04:24
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Penpals',
fields=[
... | 41.478261 | 136 | 0.587002 |
ef167393b1fce15c2c87f700fa03ccca4a9e8bdc | 4,938 | py | Python | scripts_Python/LSTM_mod_attention.py | ilariagnd/CardioICURIsk | 07aeddaa5a2140d279c57f273bdc4c5bf326e47f | [
"MIT"
] | 1 | 2021-07-19T15:58:25.000Z | 2021-07-19T15:58:25.000Z | scripts_Python/LSTM_mod_attention.py | ilariagnd/CardioICURisk | 07aeddaa5a2140d279c57f273bdc4c5bf326e47f | [
"MIT"
] | null | null | null | scripts_Python/LSTM_mod_attention.py | ilariagnd/CardioICURisk | 07aeddaa5a2140d279c57f273bdc4c5bf326e47f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import sys
import numpy as np
import pandas as pd
import tensorflow as tf
import scipy
from IPython.display import clear_output
from tensorflow.keras import activations, backend
get_ipython().run_line_magic('matplotlib', 'inline')
import matplotlib.pyplot as plt
import os.path
i... | 33.14094 | 162 | 0.739773 |
cb5c430bba5c7565a5408ce4432c0ed828f5e664 | 4,815 | py | Python | stdplugins/zombies.py | kaalhoonme/PepeBot | d1678f3c5e57adb8c9d2e1bc5a54568ad2938258 | [
"Apache-2.0"
] | null | null | null | stdplugins/zombies.py | kaalhoonme/PepeBot | d1678f3c5e57adb8c9d2e1bc5a54568ad2938258 | [
"Apache-2.0"
] | null | null | null | stdplugins/zombies.py | kaalhoonme/PepeBot | d1678f3c5e57adb8c9d2e1bc5a54568ad2938258 | [
"Apache-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
""".zombies
Usage: Searches for deleted accounts in a groups and channels.
Use .zombies clean to remove deleted accounts... | 32.755102 | 95 | 0.621807 |
f164c97e9c0ad5b8af9351c8079778a5baabd520 | 634 | py | Python | web/apps/importer/context.py | exploratour/exploratour | b6d998a5aa471c1f9eba94bd093032d3e20f6d81 | [
"Zlib"
] | null | null | null | web/apps/importer/context.py | exploratour/exploratour | b6d998a5aa471c1f9eba94bd093032d3e20f6d81 | [
"Zlib"
] | null | null | null | web/apps/importer/context.py | exploratour/exploratour | b6d998a5aa471c1f9eba94bd093032d3e20f6d81 | [
"Zlib"
] | null | null | null | import threading
class IdAllocator(object):
def __init__(self):
self.cond = threading.Condition()
self.nextid = 1
def get(self):
self.cond.acquire()
try:
ret = self.nextid
self.nextid += 1
return ret;
finally:
self.cond.re... | 20.451613 | 41 | 0.547319 |
eb15a41a244540f8b697a7ac2d8a5e20e26d3941 | 1,217 | py | Python | serializers/app_settings.py | CloudCIX/membership | a7a62918c7d7c65dd1bf2068431dbf2ec2573e4b | [
"Apache-2.0"
] | null | null | null | serializers/app_settings.py | CloudCIX/membership | a7a62918c7d7c65dd1bf2068431dbf2ec2573e4b | [
"Apache-2.0"
] | null | null | null | serializers/app_settings.py | CloudCIX/membership | a7a62918c7d7c65dd1bf2068431dbf2ec2573e4b | [
"Apache-2.0"
] | null | null | null | # libs
import serpy
class AppSettingsSerializer(serpy.Serializer):
"""
created:
description: The date that the App Settings entry was created.
type: string
id:
description: The ID of the App Settings record.
type: integer
minio_access_key:
description: Access ke... | 32.891892 | 114 | 0.657354 |
8815b0f7982bbfdbbccced36a85b0924f78b70d1 | 48,094 | py | Python | environ/lib/python3.8/site-packages/werkzeug/test.py | EsauKip/Blog-post | e5716af25139ab4e867767990f04f0749fc9bf40 | [
"MIT"
] | 1 | 2021-05-24T10:08:51.000Z | 2021-05-24T10:08:51.000Z | environ/lib/python3.8/site-packages/werkzeug/test.py | EsauKip/Blog-post | e5716af25139ab4e867767990f04f0749fc9bf40 | [
"MIT"
] | null | null | null | environ/lib/python3.8/site-packages/werkzeug/test.py | EsauKip/Blog-post | e5716af25139ab4e867767990f04f0749fc9bf40 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | import mimetypes
import sys
import typing as t
import warnings
from collections import defaultdict
from datetime import datetime
from datetime import timedelta
from http.cookiejar import CookieJar
from io import BytesIO
from itertools import chain
from random import random
from tempfile import TemporaryFile
from time i... | 36.297358 | 88 | 0.600345 |
593a87512de1f3c11689661f5eb7abcbe6e5c2bf | 3,273 | py | Python | TimeFreeze/main.py | Ashish013/Image-Filters | c49d98232d0b44c0a77a11693658d689dcf89457 | [
"MIT"
] | null | null | null | TimeFreeze/main.py | Ashish013/Image-Filters | c49d98232d0b44c0a77a11693658d689dcf89457 | [
"MIT"
] | null | null | null | TimeFreeze/main.py | Ashish013/Image-Filters | c49d98232d0b44c0a77a11693658d689dcf89457 | [
"MIT"
] | null | null | null | import cv2,time,argparse
import numpy as np
import matplotlib.pyplot as plt
from ssim_utils import generate_ssim_mask
from rcnn_utils import generate_rcnn_mask
from utils import files_downloader
ap = argparse.ArgumentParser(description = "Filter that captures instances, every '-time' seconds")
ap.add_argument("-m","--... | 35.193548 | 155 | 0.64528 |
e988813543914bfa8055c137d4d6a195235b6f59 | 24,856 | py | Python | ax/modelbridge/tests/test_base_modelbridge.py | mpolson64/Ax-1 | cf9e12cc1253efe0fc893f2620e99337e0927a26 | [
"MIT"
] | 1 | 2022-02-10T10:51:40.000Z | 2022-02-10T10:51:40.000Z | ax/modelbridge/tests/test_base_modelbridge.py | mpolson64/Ax-1 | cf9e12cc1253efe0fc893f2620e99337e0927a26 | [
"MIT"
] | null | null | null | ax/modelbridge/tests/test_base_modelbridge.py | mpolson64/Ax-1 | cf9e12cc1253efe0fc893f2620e99337e0927a26 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import warnings
from unittest import mock
import numpy as np
import pandas as pd
from ax.core.arm import Arm
from ax... | 38.006116 | 88 | 0.59036 |
6675be61a28513a86bc4498c766112733231cf3a | 5,068 | py | Python | seahub/api2/endpoints/admin/default_library.py | weimens/seahub | 5ecf78ed7a2ddc72a23961804ee41be21c24893f | [
"Apache-2.0"
] | 420 | 2015-01-03T11:34:46.000Z | 2022-03-10T07:15:41.000Z | seahub/api2/endpoints/admin/default_library.py | weimens/seahub | 5ecf78ed7a2ddc72a23961804ee41be21c24893f | [
"Apache-2.0"
] | 735 | 2015-01-04T21:22:51.000Z | 2022-03-31T09:26:07.000Z | seahub/api2/endpoints/admin/default_library.py | weimens/seahub | 5ecf78ed7a2ddc72a23961804ee41be21c24893f | [
"Apache-2.0"
] | 379 | 2015-01-05T17:08:03.000Z | 2022-03-06T00:11:50.000Z | # Copyright (c) 2012-2016 Seafile Ltd.
import logging
from rest_framework.authentication import SessionAuthentication
from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
from django.utils.translation ... | 36.460432 | 85 | 0.676796 |
5847ea24d943806b27ff7bdd4735cb6381eea6b8 | 5,457 | py | Python | proto/py_out/p4/v1/p4runtime_pb2_grpc.py | miyachu/PI | ece01da781dfa9d9b3d4d77920cc70ba7df4d479 | [
"Apache-2.0"
] | null | null | null | proto/py_out/p4/v1/p4runtime_pb2_grpc.py | miyachu/PI | ece01da781dfa9d9b3d4d77920cc70ba7df4d479 | [
"Apache-2.0"
] | null | null | null | proto/py_out/p4/v1/p4runtime_pb2_grpc.py | miyachu/PI | ece01da781dfa9d9b3d4d77920cc70ba7df4d479 | [
"Apache-2.0"
] | 1 | 2021-11-11T07:05:45.000Z | 2021-11-11T07:05:45.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import p4.v1.p4runtime_pb2 as p4_dot_v1_dot_p4runtime__pb2
class P4RuntimeStub(object):
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Write = channel.unary_unary(
... | 45.475 | 113 | 0.770203 |
e89eea51a01e0f8103c024c6ab660044f6d8f93e | 993 | py | Python | venv/Lib/site-packages/tests/test_130_PrepExecuteSelectStmt.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_130_PrepExecuteSelectStmt.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_130_PrepExecuteSelectStmt.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_130_PrepExecuteSelectStmt(self):
obj = IbmDbTestFunctions()
obj.assert_expect(se... | 18.388889 | 93 | 0.642497 |
64edb6a189abc5f78fe4741c40bf9384d9cded94 | 8,797 | py | Python | tests/test_futures.py | hoodmane/loky | 00fbd9d5e8ebc8f9427096a0f64d7d7ad51b9f9b | [
"BSD-3-Clause"
] | 248 | 2016-10-05T21:28:32.000Z | 2022-03-12T01:55:33.000Z | tests/test_futures.py | hoodmane/loky | 00fbd9d5e8ebc8f9427096a0f64d7d7ad51b9f9b | [
"BSD-3-Clause"
] | 169 | 2016-10-03T17:31:33.000Z | 2020-01-15T13:53:39.000Z | tests/test_futures.py | hoodmane/loky | 00fbd9d5e8ebc8f9427096a0f64d7d7ad51b9f9b | [
"BSD-3-Clause"
] | 27 | 2016-10-01T14:08:09.000Z | 2021-01-13T18:24:02.000Z | import sys
import time
import pytest
import threading
from loky._base import (PENDING, RUNNING, CANCELLED, CANCELLED_AND_NOTIFIED,
FINISHED, Future)
from .utils import captured_stderr
if sys.version_info[:2] < (3, 3):
import loky._base as futures
else:
# This makes sure of the compatibi... | 33.448669 | 78 | 0.631011 |
0f11ecf2903f26aed2c8507506c45844f6ec6532 | 2,238 | py | Python | task/common/MyLogFileHandler.py | withcouragetol/codebee-10l | 2636b8fc1b456a85201b868201cf9c147d739031 | [
"Apache-2.0"
] | 6 | 2018-04-13T09:48:26.000Z | 2020-06-22T13:42:10.000Z | task/common/MyLogFileHandler.py | withcouragetol/codebee-10l | 2636b8fc1b456a85201b868201cf9c147d739031 | [
"Apache-2.0"
] | null | null | null | task/common/MyLogFileHandler.py | withcouragetol/codebee-10l | 2636b8fc1b456a85201b868201cf9c147d739031 | [
"Apache-2.0"
] | 2 | 2018-09-04T07:09:50.000Z | 2019-08-18T15:11:00.000Z | from logging import FileHandler
import os
import time
try:
import codecs
except ImportError:
codecs = None
class SafeFileHandler(FileHandler):
def __init__(self, filename, mode, encoding=None, delay=0):
"""
Use the specified filename for streamed logging
"""
if codecs is ... | 29.064935 | 77 | 0.575514 |
2b1681dfc5a88bc3779005951258d36988d8c73a | 423 | py | Python | apps/blog/migrations/0006_post_slug.py | Almazishe/portfolio | a69deded88e761ae06bf817646609c5237afb045 | [
"MIT"
] | null | null | null | apps/blog/migrations/0006_post_slug.py | Almazishe/portfolio | a69deded88e761ae06bf817646609c5237afb045 | [
"MIT"
] | null | null | null | apps/blog/migrations/0006_post_slug.py | Almazishe/portfolio | a69deded88e761ae06bf817646609c5237afb045 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-01-16 04:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0005_auto_20210116_0726'),
]
operations = [
migrations.AddField(
model_name='post',
name='slug',
... | 22.263158 | 96 | 0.607565 |
3fbcf798b1a2a73fb05c7178cfd5984de7ffd6c5 | 220,725 | py | Python | pywikibot/page.py | npdoty/pywikibot | d0687ce7035401ffb63f4a95d225c27ed9ba722b | [
"MIT"
] | null | null | null | pywikibot/page.py | npdoty/pywikibot | d0687ce7035401ffb63f4a95d225c27ed9ba722b | [
"MIT"
] | null | null | null | pywikibot/page.py | npdoty/pywikibot | d0687ce7035401ffb63f4a95d225c27ed9ba722b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Objects representing various types of MediaWiki, including Wikibase, pages.
This module also includes objects:
* Property: a type of semantic data.
* Claim: an instance of a semantic assertion.
* Revision: a single change to a wiki page.
* FileInfo: a structure holding imageinfo of latest ... | 37.159091 | 97 | 0.577366 |
328cc88e3864c4653e1c1f80b0b9ee978432198a | 4,484 | bzl | Python | scala/scala_import.bzl | systemlogic/rules_scala | dec85a95d13f403f360cb51829f1804d0518165a | [
"Apache-2.0"
] | 1 | 2021-04-28T21:40:28.000Z | 2021-04-28T21:40:28.000Z | scala/scala_import.bzl | samschlegel/rules_scala | d51277e59b635c05e86c2760eb4ee1b7d2f51770 | [
"Apache-2.0"
] | null | null | null | scala/scala_import.bzl | samschlegel/rules_scala | d51277e59b635c05e86c2760eb4ee1b7d2f51770 | [
"Apache-2.0"
] | null | null | null | #intellij part is tested manually, tread lightly when changing there
#if you change make sure to manually re-import an intellij project and see imports
#are resolved (not red) and clickable
def _scala_import_impl(ctx):
target_data = _code_jars_and_intellij_metadata_from(ctx.attr.jars)
(current_target_compile_jars,
... | 37.680672 | 83 | 0.735058 |
24d9df8e8632b5b76e3365c767b17c08c7211c75 | 1,657 | py | Python | docs/guide/class_templates/agents.py | jgori-ouistiti/CoopIHC | 0fe24c618a430517c1394625275faff3ce344f7f | [
"MIT"
] | null | null | null | docs/guide/class_templates/agents.py | jgori-ouistiti/CoopIHC | 0fe24c618a430517c1394625275faff3ce344f7f | [
"MIT"
] | 52 | 2021-11-23T13:49:50.000Z | 2022-03-15T12:28:18.000Z | docs/guide/class_templates/agents.py | jgori-ouistiti/interaction-agents | 922d9bddb2b14784e32c4639b66cec302e80e13a | [
"MIT"
] | 1 | 2022-03-08T11:10:24.000Z | 2022-03-08T11:10:24.000Z | from coopihc.agents import BaseAgent
class MyNewAgent(BaseAgent):
""" Use this class as template to build your new agent.
:param myparameter(type): explain the parameter here
:return: what is returned
:meta public:
"""
def __init__(self, arg1, *args, **kwargs):
self.arg1 = arg1
... | 27.163934 | 68 | 0.54315 |
9f59bb5fe48ccb9496658ace1cc4cd2c830c1c94 | 7,818 | py | Python | magenta/music/pianoroll_lib_test.py | vaipatel/magenta | 8a828116c2a73c26724204987d2b5bddaab31a7e | [
"Apache-2.0"
] | 16 | 2016-09-02T04:59:30.000Z | 2022-01-11T10:38:29.000Z | magenta/music/pianoroll_lib_test.py | Kiku-git/magenta | b36c65466745ff1e056dca40179ae71306a0ca5b | [
"Apache-2.0"
] | 2 | 2016-09-25T16:39:59.000Z | 2016-11-18T17:43:41.000Z | magenta/music/pianoroll_lib_test.py | Kiku-git/magenta | b36c65466745ff1e056dca40179ae71306a0ca5b | [
"Apache-2.0"
] | 10 | 2016-09-02T04:59:32.000Z | 2021-09-29T06:57:24.000Z | # Copyright 2019 The Magenta Authors.
#
# 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 ... | 34.746667 | 77 | 0.695574 |
c92d101b746046fe96e07afd2d7534467bfc9e6c | 1,611 | py | Python | texts/extraction/text_parser/terms_utils.py | nicolay-r/frame-based-attitude-extraction-workflow | f20e6d17a9eb6613028545b889c74626a8260ccd | [
"MIT"
] | null | null | null | texts/extraction/text_parser/terms_utils.py | nicolay-r/frame-based-attitude-extraction-workflow | f20e6d17a9eb6613028545b889c74626a8260ccd | [
"MIT"
] | 6 | 2020-10-03T13:45:38.000Z | 2021-07-13T18:31:57.000Z | texts/extraction/text_parser/terms_utils.py | nicolay-r/frame-based-attitude-extraction-workflow | f20e6d17a9eb6613028545b889c74626a8260ccd | [
"MIT"
] | null | null | null | from core.processing.lemmatization.base import Stemmer
from core.processing.ner.base import NamedEntityRecognition
from core.runtime.parser import ParsedText, TextParser
def to_input_terms(text, ner, stemmer, return_parsed_text=True, lemmatized_terms=False):
assert(isinstance(ner, NamedEntityRecognition) or ner i... | 37.465116 | 98 | 0.701428 |
488d5972cfb9b540566612c37adf3b327923a012 | 445 | py | Python | PythonExercicios/ex063.py | Luis-Emanuel/Python | 92936dfb005b9755a53425d16c3ff54119eebe78 | [
"MIT"
] | null | null | null | PythonExercicios/ex063.py | Luis-Emanuel/Python | 92936dfb005b9755a53425d16c3ff54119eebe78 | [
"MIT"
] | null | null | null | PythonExercicios/ex063.py | Luis-Emanuel/Python | 92936dfb005b9755a53425d16c3ff54119eebe78 | [
"MIT"
] | null | null | null | #Escreva que leia um número n inteiro qualquer e mostre na tela os n primeiros elementos da Sequência de Fibonacci
#Ex: 0 -> 1 -> 1 -> 2 -> 3 -> 5 -> 8 -> 13 ....
print(20*'-')
print('Seguencia de Fibonacci')
print(20*'-')
n = int(input('Quantos termos você que mostra ? '))
c = 3
t1 = 0
t2 = 1
print('{} -> {} -> '.for... | 27.8125 | 114 | 0.548315 |
2adc870691f1d22fc93698e2b98930f8c95e9760 | 1,738 | py | Python | gpflow/__init__.py | codelover-without-talent/GPflow | 1af7b1ca7da6687974150a1440d821a106b2159d | [
"Apache-2.0"
] | 1 | 2020-01-27T19:05:28.000Z | 2020-01-27T19:05:28.000Z | gpflow/__init__.py | codelover-without-talent/GPflow | 1af7b1ca7da6687974150a1440d821a106b2159d | [
"Apache-2.0"
] | null | null | null | gpflow/__init__.py | codelover-without-talent/GPflow | 1af7b1ca7da6687974150a1440d821a106b2159d | [
"Apache-2.0"
] | 2 | 2019-03-09T11:46:11.000Z | 2021-12-20T10:22:34.000Z | # Copyright 2016 alexggmatthews, James Hensman
#
# 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 t... | 28.966667 | 74 | 0.808976 |
9bd751d62c496fbfaf01c0e1acee65a3a25e1e54 | 389 | py | Python | services/dsrp-api/app/api/company_payment_info/response_models.py | bcgov/dormant-site-reclamation-program | 4710434174a204a292a3128d92c8daf1de2a65a6 | [
"Apache-2.0"
] | null | null | null | services/dsrp-api/app/api/company_payment_info/response_models.py | bcgov/dormant-site-reclamation-program | 4710434174a204a292a3128d92c8daf1de2a65a6 | [
"Apache-2.0"
] | 9 | 2020-05-06T23:29:43.000Z | 2022-03-14T22:58:17.000Z | services/dsrp-api/app/api/company_payment_info/response_models.py | bcgov/dormant-site-reclamation-program | 4710434174a204a292a3128d92c8daf1de2a65a6 | [
"Apache-2.0"
] | 3 | 2020-05-08T16:54:22.000Z | 2021-01-27T17:28:49.000Z | from app.extensions import api
from flask_restplus import fields
COMPANY_PAYMENT_INFO = api.model(
'CompanyPaymentInfo', {
'company_name': fields.String,
'company_address': fields.String,
'po_number': fields.String,
'po_number_2': fields.String,
'qualified_receiver_name': fi... | 29.923077 | 49 | 0.683805 |
5b1c6dc65a5a5272c75a52ec2680f3b3cc879aad | 4,994 | py | Python | testscripts/RDKB/component/TELCOVOICEMgrHal/TS_TelcoVoiceMgrHal_Init.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/TELCOVOICEMgrHal/TS_TelcoVoiceMgrHal_Init.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/TELCOVOICEMgrHal/TS_TelcoVoiceMgrHal_Init.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2021 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 42.683761 | 133 | 0.731678 |
6926df8a878de09ada2700f33e74e5195b170ed0 | 1,317 | py | Python | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/GetQualificationUploadPolicyRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/GetQualificationUploadPolicyRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/GetQualificationUploadPolicyRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | # 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 u... | 36.583333 | 84 | 0.768413 |
d7ed75f59eb755234f6604e8624825c06225ea45 | 654 | py | Python | BootStrapWEB/Bs.py | sir1st/homework | 9c75f9e6dca814a171d1b61b331fa87407c9b4a6 | [
"MIT"
] | null | null | null | BootStrapWEB/Bs.py | sir1st/homework | 9c75f9e6dca814a171d1b61b331fa87407c9b4a6 | [
"MIT"
] | 1 | 2018-01-04T05:50:54.000Z | 2018-01-04T05:50:54.000Z | BootStrapWEB/Bs.py | sir1st/homework | 9c75f9e6dca814a171d1b61b331fa87407c9b4a6 | [
"MIT"
] | null | null | null | #coding:utf-8
from flask import Flask,render_template,send_from_directory,request
#from flask.ext.bootstrap import Bootstrap #专为Flask开发发拓展都暴露在flask.ext命名空间下,Flask-Bootstrap输出一个Bootstrap类
from flask_bootstrap import Bootstrap
app=Flask(__name__)
bootstrap=Bootstrap(app)#Flask扩展一般都在创建实例时初始化,这行代码是Flask-Bootstrap的初始化方法
@ap... | 34.421053 | 104 | 0.766055 |
479905398dc59f3525ae6efd8f3ab243714b318e | 4,351 | py | Python | tempest/api/object_storage/test_object_version.py | dommgifer/repo | 2e3b9c4f92c4d1b63cd3e3d8ec4824f6bfc37bc2 | [
"Apache-2.0"
] | null | null | null | tempest/api/object_storage/test_object_version.py | dommgifer/repo | 2e3b9c4f92c4d1b63cd3e3d8ec4824f6bfc37bc2 | [
"Apache-2.0"
] | null | null | null | tempest/api/object_storage/test_object_version.py | dommgifer/repo | 2e3b9c4f92c4d1b63cd3e3d8ec4824f6bfc37bc2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 44.397959 | 79 | 0.64422 |
f0395e26d540c26fe0217438e04d8c6e73a25a90 | 2,526 | py | Python | feedback.py | josephkreiser/chicago-roboto | c9bdbee1cdc686c6866fd9231353ee91bbe6623a | [
"Apache-2.0"
] | 131 | 2017-02-23T02:35:44.000Z | 2018-05-28T07:38:47.000Z | feedback.py | josephkreiser/chicago-roboto | c9bdbee1cdc686c6866fd9231353ee91bbe6623a | [
"Apache-2.0"
] | 23 | 2017-04-06T20:40:41.000Z | 2018-04-16T13:38:30.000Z | feedback.py | josephkreiser/chicago-roboto | c9bdbee1cdc686c6866fd9231353ee91bbe6623a | [
"Apache-2.0"
] | 33 | 2017-02-23T06:35:37.000Z | 2018-04-19T07:35:05.000Z | #!/usr/bin/env python
import sys, getopt, json, codecs
import mistune
import pystache
from os import path
template = """Hey there {{speaker}},
Thank you so much for helping make Chicago Roboto a big success. As promised, here are your session feedback results.
Session: **{{session}}**
Average Score:
{{average_ta... | 27.16129 | 118 | 0.660333 |
6ec000da1564f2eb303d70f396e1b348cd894235 | 1,505 | py | Python | L1Trigger/L1THGCal/python/customTriggerCellSelect.py | Nik-Menendez/L1Trigger | 5336631cc0a517495869279ed7d3a4cac8d4e5e5 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | L1Trigger/L1THGCal/python/customTriggerCellSelect.py | Nik-Menendez/L1Trigger | 5336631cc0a517495869279ed7d3a4cac8d4e5e5 | [
"Apache-2.0"
] | 3 | 2018-08-23T13:40:24.000Z | 2019-12-05T21:16:03.000Z | L1Trigger/L1THGCal/python/customTriggerCellSelect.py | Nik-Menendez/L1Trigger | 5336631cc0a517495869279ed7d3a4cac8d4e5e5 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
import SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi as digiparam
from L1Trigger.L1THGCal.hgcalConcentratorProducer_cfi import threshold_conc_proc, best_conc_proc, supertc_conc_proc
def custom_triggercellselect_supertriggercell(process,
... | 47.03125 | 127 | 0.671761 |
5fb38f864681f3aea1690245ae9ba1ecf3e45617 | 265 | py | Python | tests/artificial/transf_None/trend_MovingAverage/cycle_7/ar_12/test_artificial_1024_None_MovingAverage_7_12_20.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_None/trend_MovingAverage/cycle_7/ar_12/test_artificial_1024_None_MovingAverage_7_12_20.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_None/trend_MovingAverage/cycle_7/ar_12/test_artificial_1024_None_MovingAverage_7_12_20.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 7, transform = "None", sigma = 0.0, exog_count = 20, ar_order = 12); | 37.857143 | 165 | 0.732075 |
ca52286dbfb729d490e25b94b7bf4561915ff879 | 1,646 | py | Python | los_tools/__init__.py | JanCaha/qgis_los_tools | f465acb70a49a86f86e68235300d6637d85adc29 | [
"MIT"
] | 1 | 2021-08-23T23:44:03.000Z | 2021-08-23T23:44:03.000Z | los_tools/__init__.py | JanCaha/qgis_los_tools | f465acb70a49a86f86e68235300d6637d85adc29 | [
"MIT"
] | 14 | 2020-04-17T14:19:56.000Z | 2021-02-17T21:21:52.000Z | los_tools/__init__.py | JanCaha/qgis_los_tools | f465acb70a49a86f86e68235300d6637d85adc29 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
los_tools
A QGIS plugin
This plugin creates and analyzes lines of sight and also provides supporting tools.
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Bui... | 40.146341 | 84 | 0.439247 |
fe6328d7c3df67c50ef7c55cd36d6a37133504ed | 7,762 | py | Python | sdk/python/pulumi_aws/opsworks/php_app_layer.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/opsworks/php_app_layer.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/opsworks/php_app_layer.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from .. import utilities, tables
class PhpAppLayer(pulumi.CustomResour... | 45.928994 | 609 | 0.721335 |
ff341780146347455e4baf83bcac4f80113d15e7 | 1,089 | py | Python | Pilot/src/run_wrapper.py | yumiai/Risk-Adjusted-Bonding-Curves | 56b4f714dc145cca1503b7c80d6a7b38c1e2e3fc | [
"MIT"
] | 31 | 2020-11-09T21:04:39.000Z | 2022-03-22T14:08:34.000Z | Pilot/src/run_wrapper.py | dnzengou/Risk-Adjusted-Bonding-Curves | 56b4f714dc145cca1503b7c80d6a7b38c1e2e3fc | [
"MIT"
] | 1 | 2020-03-24T16:20:49.000Z | 2020-03-24T16:20:49.000Z | Pilot/src/run_wrapper.py | dnzengou/Risk-Adjusted-Bonding-Curves | 56b4f714dc145cca1503b7c80d6a7b38c1e2e3fc | [
"MIT"
] | 7 | 2021-01-18T02:49:48.000Z | 2022-02-24T11:50:46.000Z | import pandas as pd
from cadCAD.engine import ExecutionMode, ExecutionContext, Executor
from cadCAD.configuration import Experiment
from cadCAD import configs
def run(drop_midsteps: bool=True) -> pd.DataFrame:
exec_mode = ExecutionMode()
exec_context = ExecutionContext(exec_mode.local_mode)
run = Executor... | 27.225 | 67 | 0.682277 |
f0d2ead39cdd7f415b7cddb6ef88e662d85307e2 | 78 | py | Python | strategy/__init__.py | Neyzoter/Nelearn | b0aa9e0b40592a633e872eb0d1f73beb41cae9ee | [
"MIT"
] | null | null | null | strategy/__init__.py | Neyzoter/Nelearn | b0aa9e0b40592a633e872eb0d1f73beb41cae9ee | [
"MIT"
] | null | null | null | strategy/__init__.py | Neyzoter/Nelearn | b0aa9e0b40592a633e872eb0d1f73beb41cae9ee | [
"MIT"
] | null | null | null | """The Nelearn.strategy package."""
import sys
__author__ = 'Neyzoter Song'
| 13 | 35 | 0.717949 |
4b437795651de313d2eb0af071a3ba5c133ec9fa | 1,560 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SMagnet/PMagnet14/Gen_PMagnet14.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | 2 | 2019-06-08T15:04:39.000Z | 2020-09-07T13:32:22.000Z | pyleecan/GUI/Dialog/DMachineSetup/SMagnet/PMagnet14/Gen_PMagnet14.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SMagnet/PMagnet14/Gen_PMagnet14.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""File generated according to PMagnet14/gen_list.json
WARNING! All changes made in this file will be lost!
"""
from pyleecan.GUI.Dialog.DMachineSetup.SMagnet.PMagnet14.Ui_PMagnet14 import (
Ui_PMagnet14,
)
class Gen_PMagnet14(Ui_PMagnet14):
def setupUi(self, PMagnet14):
"""Abs... | 33.191489 | 78 | 0.632051 |
1ec797461d9abcb98dc7cbf8184fb571d2d28b4b | 422 | py | Python | invoice/migrations/0004_auto_20160921_1732.py | elegant-solutions/django-webstore | 2c53189ea075a1d60a4d1e20a69ec8e831894068 | [
"MIT"
] | 1 | 2020-10-24T08:45:32.000Z | 2020-10-24T08:45:32.000Z | invoice/migrations/0004_auto_20160921_1732.py | elegant-solutions/django-webstore | 2c53189ea075a1d60a4d1e20a69ec8e831894068 | [
"MIT"
] | 14 | 2016-09-22T17:06:38.000Z | 2016-10-12T18:25:39.000Z | invoice/migrations/0004_auto_20160921_1732.py | elegant-solutions/django-webstore | 2c53189ea075a1d60a4d1e20a69ec8e831894068 | [
"MIT"
] | 3 | 2016-10-07T12:03:35.000Z | 2021-04-17T09:24:21.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('invoice', '0003_auto_20160921_1730'),
]
operations = [
migrations.AlterField(
model_name='usercheckout',
... | 21.1 | 65 | 0.616114 |
a8b2323f69404070b60ca33f9c4c954daa9416a8 | 5,684 | py | Python | data_generation/fractal_graph_expansions/random_matrix_ops.py | mwnewlin/afit_mlperf_training | abdf362abe6a14a85e13b8b18afe7d40cc9e5430 | [
"Apache-2.0"
] | null | null | null | data_generation/fractal_graph_expansions/random_matrix_ops.py | mwnewlin/afit_mlperf_training | abdf362abe6a14a85e13b8b18afe7d40cc9e5430 | [
"Apache-2.0"
] | 12 | 2019-03-25T17:38:16.000Z | 2022-03-11T23:43:25.000Z | data_generation/fractal_graph_expansions/random_matrix_ops.py | mwnewlin/afit_mlperf_training | abdf362abe6a14a85e13b8b18afe7d40cc9e5430 | [
"Apache-2.0"
] | 1 | 2019-03-11T15:59:25.000Z | 2019-03-11T15:59:25.000Z | # Copyright 2018 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... | 40.892086 | 83 | 0.677516 |
29de9d30c974bd300ec62d731527a9a6ef243d67 | 4,716 | py | Python | pyecharts/custom/timeline.py | xieyinsong/pyecharts | 6ea6654c7a9cc19f89cf507a3c51fe77dd538e06 | [
"MIT"
] | null | null | null | pyecharts/custom/timeline.py | xieyinsong/pyecharts | 6ea6654c7a9cc19f89cf507a3c51fe77dd538e06 | [
"MIT"
] | null | null | null | pyecharts/custom/timeline.py | xieyinsong/pyecharts | 6ea6654c7a9cc19f89cf507a3c51fe77dd538e06 | [
"MIT"
] | null | null | null | # coding=utf-8
import copy
from pyecharts.base import Base
from pyecharts.constants import PAGE_TITLE
from pyecharts.utils import merge_js_dependencies
class Timeline(Base):
"""
<<< 时间线轮播多张图 >>>
"""
def __init__(
self,
page_title=PAGE_TITLE,
width=800,
height=400,
... | 31.231788 | 72 | 0.529262 |
b40a224a859271210987777174d9ae07fbeb8a98 | 9,044 | py | Python | classif_and_ktst.py | emanuele/jstsp2015 | 6246d28013652ddf2f889abe9d256ce0afd4d326 | [
"MIT"
] | 8 | 2017-03-31T23:59:53.000Z | 2022-01-16T18:51:54.000Z | classif_and_ktst.py | emanuele/jstsp2015 | 6246d28013652ddf2f889abe9d256ce0afd4d326 | [
"MIT"
] | null | null | null | classif_and_ktst.py | emanuele/jstsp2015 | 6246d28013652ddf2f889abe9d256ce0afd4d326 | [
"MIT"
] | 14 | 2016-01-03T09:01:02.000Z | 2020-03-31T06:05:57.000Z | """Classification-based test and kernel two-sample test.
Author: Sandro Vega-Pons, Emanuele Olivetti.
"""
import os
import numpy as np
from sklearn.metrics import pairwise_distances, confusion_matrix
from sklearn.metrics import pairwise_kernels
from sklearn.svm import SVC
from sklearn.cross_validation import Stratifi... | 34.519084 | 180 | 0.601283 |
08c40c0ecc32085e382fc625e515f587aedb1a19 | 265 | py | Python | reverse_order.py | madhurilalitha/Test-repo | a70922a66156c1780e012b5d74017b16c962ecda | [
"MIT"
] | null | null | null | reverse_order.py | madhurilalitha/Test-repo | a70922a66156c1780e012b5d74017b16c962ecda | [
"MIT"
] | null | null | null | reverse_order.py | madhurilalitha/Test-repo | a70922a66156c1780e012b5d74017b16c962ecda | [
"MIT"
] | null | null | null | '''given a list print all the elements of the list in reverse way'''
def reverse_order(alist):
reverse_list = []
for i in range(len(alist)-1, -1):
reverse_list.append(alist[i])
return reverse_list
reverse = reverse_order([2,6,0,1,5])
print(reverse)
| 26.5 | 69 | 0.690566 |
7309c09c5a675725a01cbbf25ad5b599242788bb | 4,328 | py | Python | extra/sqlharvest/sqlharvest.py | danielvvDev/Sqlmap-Reforced2 | 6780f801471ebfee5424781c548c47e11d272dc9 | [
"MIT"
] | 3 | 2019-04-09T22:59:33.000Z | 2019-06-14T09:23:24.000Z | extra/sqlharvest/sqlharvest.py | danielvvDev/Sqlmap-Reforced2 | 6780f801471ebfee5424781c548c47e11d272dc9 | [
"MIT"
] | null | null | null | extra/sqlharvest/sqlharvest.py | danielvvDev/Sqlmap-Reforced2 | 6780f801471ebfee5424781c548c47e11d272dc9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import cookielib
import re
import socket
import sys
import urllib
import urllib2
import ConfigParser
from operator import itemgetter
TIMEOUT = 10
CONFIG_FILE = 'sqlharvest.cfg'
... | 30.478873 | 127 | 0.496996 |
ebd022a798aba7a6f654374c8a99b2545ed8ebb7 | 90 | py | Python | boa3_test/example/arithmetic_test/MixedOperations.py | jplippi/neo3-boa | 052be4adebb665113715bb80067d954f7ad85ad5 | [
"Apache-2.0"
] | null | null | null | boa3_test/example/arithmetic_test/MixedOperations.py | jplippi/neo3-boa | 052be4adebb665113715bb80067d954f7ad85ad5 | [
"Apache-2.0"
] | null | null | null | boa3_test/example/arithmetic_test/MixedOperations.py | jplippi/neo3-boa | 052be4adebb665113715bb80067d954f7ad85ad5 | [
"Apache-2.0"
] | null | null | null | def Main(a: int, b: int, c: int, d: int, e: int) -> int:
return a + c * e - (-d) // b
| 30 | 56 | 0.455556 |
6a4e73f06f0a6bfbd57c61f5efd97ec13023b45e | 850 | py | Python | users/migrations/0001_initial.py | omarion3698/awwards | 5e4b9330c11d1bdda511bb27141021e17f88c96f | [
"MIT"
] | null | null | null | users/migrations/0001_initial.py | omarion3698/awwards | 5e4b9330c11d1bdda511bb27141021e17f88c96f | [
"MIT"
] | null | null | null | users/migrations/0001_initial.py | omarion3698/awwards | 5e4b9330c11d1bdda511bb27141021e17f88c96f | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-26 18:30
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... | 31.481481 | 121 | 0.637647 |
2e2fdbe54eb8b76f0b8d1600568aad6debc4154a | 11,495 | py | Python | py_src/lingtree/tigerxml.py | yv/lingtree | 7356baa6792db0f88aa7b4f0ab4c2e32907741d6 | [
"MIT"
] | 1 | 2021-08-06T14:16:42.000Z | 2021-08-06T14:16:42.000Z | py_src/lingtree/tigerxml.py | yv/lingtree | 7356baa6792db0f88aa7b4f0ab4c2e32907741d6 | [
"MIT"
] | null | null | null | py_src/lingtree/tigerxml.py | yv/lingtree | 7356baa6792db0f88aa7b4f0ab4c2e32907741d6 | [
"MIT"
] | 1 | 2021-08-06T14:16:44.000Z | 2021-08-06T14:16:44.000Z | # Copyright 2008-2020 Yannick Versley
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, dist... | 37.8125 | 115 | 0.571727 |
232477d1a2e19b60e70bb78d55802171edcce92e | 4,693 | py | Python | members/conferences/models.py | ocwc/ocwc-members | 3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b | [
"MIT"
] | null | null | null | members/conferences/models.py | ocwc/ocwc-members | 3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b | [
"MIT"
] | 7 | 2015-11-27T15:59:52.000Z | 2022-01-13T00:38:38.000Z | members/conferences/models.py | ocwc/ocwc-members | 3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import uuid
from tinymce import HTMLField
from django.db import models
from django.urls import reverse
from django.core.mail import EmailMessage
from django.conf import settings
from django.contrib.postgres.fields import JSONField
from crm.utils import print_pdf
class ConferenceInterface(mod... | 32.590278 | 126 | 0.698061 |
765c307e60a8598ba3064ba78bba927c29c41d7d | 5,456 | py | Python | examples/advanced_operations/get_ad_group_bid_modifiers.py | tridge-hq/google-ads-python | 7c61e0705063324b973a6bdf1d83193c032a9012 | [
"Apache-2.0"
] | null | null | null | examples/advanced_operations/get_ad_group_bid_modifiers.py | tridge-hq/google-ads-python | 7c61e0705063324b973a6bdf1d83193c032a9012 | [
"Apache-2.0"
] | null | null | null | examples/advanced_operations/get_ad_group_bid_modifiers.py | tridge-hq/google-ads-python | 7c61e0705063324b973a6bdf1d83193c032a9012 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2018 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 ... | 38.422535 | 99 | 0.662207 |
e1984495dc1b2c59fcd4b8d29bc40f142bb27812 | 19,012 | py | Python | train.py | zhaoguangxiang/OFA | cc1719df2713f0a046f34acb0afd8782e08ea6be | [
"Apache-2.0"
] | 1 | 2022-03-05T15:05:02.000Z | 2022-03-05T15:05:02.000Z | train.py | zhaoguangxiang/OFA | cc1719df2713f0a046f34acb0afd8782e08ea6be | [
"Apache-2.0"
] | null | null | null | train.py | zhaoguangxiang/OFA | cc1719df2713f0a046f34acb0afd8782e08ea6be | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3 -u
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Train a new model on one or across multiple GPUs.
"""
import argparse
import logging
import math
import os
impor... | 36.007576 | 109 | 0.658847 |
83fd7aaaffabb7a483a7f6f86d41e4bfe7809542 | 125 | py | Python | mywebsite/celebrities/urls.py | zncombs/practice_django | fb3e519cd325ddf64cf77a5b597046c306e4ff62 | [
"MIT"
] | null | null | null | mywebsite/celebrities/urls.py | zncombs/practice_django | fb3e519cd325ddf64cf77a5b597046c306e4ff62 | [
"MIT"
] | null | null | null | mywebsite/celebrities/urls.py | zncombs/practice_django | fb3e519cd325ddf64cf77a5b597046c306e4ff62 | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^$', views.index, name="index"),
]
| 15.625 | 42 | 0.664 |
9a775a17f4895e3c2875a28a17e3c375bd54b30c | 1,274 | py | Python | library_management/library_management/doctype/library_transaction/library_transaction.py | Dharmraj-48/Library-Managment-Frappe | 970b9d5d58845d9c576257d1ebdca730f1ac42b9 | [
"MIT"
] | null | null | null | library_management/library_management/doctype/library_transaction/library_transaction.py | Dharmraj-48/Library-Managment-Frappe | 970b9d5d58845d9c576257d1ebdca730f1ac42b9 | [
"MIT"
] | null | null | null | library_management/library_management/doctype/library_transaction/library_transaction.py | Dharmraj-48/Library-Managment-Frappe | 970b9d5d58845d9c576257d1ebdca730f1ac42b9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, ME and contributors
# For license information, please see license.txt
# from __future__ import unicode_literals
# # import frappe
# from frappe.model.document import Document
# class LibraryTransaction(Document):
# pass
from __future__ import unicode_literals
import fr... | 38.606061 | 85 | 0.648352 |
5d2818c257042eaa2d43005e7aebc5bf9f99a14f | 2,237 | py | Python | sources/drawers/console_drawer.py | alxcp/RaspberryPi.ws28x.Drawer | 718e4d3dd64f1229eb1a2726bc57bfe3829dff2b | [
"MIT"
] | null | null | null | sources/drawers/console_drawer.py | alxcp/RaspberryPi.ws28x.Drawer | 718e4d3dd64f1229eb1a2726bc57bfe3829dff2b | [
"MIT"
] | null | null | null | sources/drawers/console_drawer.py | alxcp/RaspberryPi.ws28x.Drawer | 718e4d3dd64f1229eb1a2726bc57bfe3829dff2b | [
"MIT"
] | null | null | null | import time
from colr import color
from sources.helpers.color_rgb import ColorRGB
from sources.drawers.base import DrawerBase
class ConsoleDrawer(DrawerBase):
calibration_table = None
calibrate = False
intensity_min = 170
intensity_max = 255
def __init__(self, n_led):
super().__init__(n_... | 28.679487 | 70 | 0.592311 |
6d0cd961cde46dd57a0ce87c5fb5fcaa43a8c8ec | 4,067 | py | Python | ox_mon/common/interface.py | emin63/ox_mon | 965a36c430950c47d3cce79486c1ab2cc5ee89a4 | [
"MIT"
] | null | null | null | ox_mon/common/interface.py | emin63/ox_mon | 965a36c430950c47d3cce79486c1ab2cc5ee89a4 | [
"MIT"
] | null | null | null | ox_mon/common/interface.py | emin63/ox_mon | 965a36c430950c47d3cce79486c1ab2cc5ee89a4 | [
"MIT"
] | null | null | null | """Common interface for various types of monitors in ox_mon
"""
import datetime
import logging
from ox_mon.common import exceptions
from ox_mon.common import noters
class OxMonTask:
"""Abstract class representing interface for ox mon task
Each task should implement the following interface:
1. Have an `__in... | 33.61157 | 77 | 0.634866 |
5d20d8500cd369b5790e69fae73d72eeab506581 | 1,609 | py | Python | tethysapp/modflow/job_executables/update_resource_status.py | Aquaveo/tethysapp-modflow | 5e662d8346f2ffd414ac912a531eef06c5ae79d9 | [
"BSD-3-Clause"
] | null | null | null | tethysapp/modflow/job_executables/update_resource_status.py | Aquaveo/tethysapp-modflow | 5e662d8346f2ffd414ac912a531eef06c5ae79d9 | [
"BSD-3-Clause"
] | null | null | null | tethysapp/modflow/job_executables/update_resource_status.py | Aquaveo/tethysapp-modflow | 5e662d8346f2ffd414ac912a531eef06c5ae79d9 | [
"BSD-3-Clause"
] | null | null | null | #!/opt/tethys-python
import sys
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from modflow_adapter.models.app_users.modflow_model_resource import ModflowModelResource
def run(workflow, resource_db_url, resource_id):
resource_db_session = None
try:
# Get resource
... | 34.978261 | 106 | 0.740833 |
36a65d16899ac01b9143a7bd6ac77b13d5471858 | 1,573 | py | Python | MCQ Scraper.py | sdevandran/MCQ-Scraper | 53f29ed4acd580dfdd7a53d5413690f6cc645fa0 | [
"MIT"
] | null | null | null | MCQ Scraper.py | sdevandran/MCQ-Scraper | 53f29ed4acd580dfdd7a53d5413690f6cc645fa0 | [
"MIT"
] | null | null | null | MCQ Scraper.py | sdevandran/MCQ-Scraper | 53f29ed4acd580dfdd7a53d5413690f6cc645fa0 | [
"MIT"
] | null | null | null | import requests
import re
from bs4 import BeautifulSoup
chapters = 32
# https://pinoybix.org/2015/10/practice-quiz-in-data-communications-and-networking.html
response = requests.get(
'https://pinoybix.org/2020/02/quiz-in-data-communications-and-networking-ece-board-exam.html')
a = response.text
z = re.finda... | 47.666667 | 334 | 0.586777 |
d035aecc9aad87c742e98e4a65baae134b96aae4 | 4,188 | py | Python | tests/python/pants_test/help/test_build_dictionary_info_extracter.py | mosesn/pants | 7fddcc5d68272a03e9a2b4224b8da728d35eabb2 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/help/test_build_dictionary_info_extracter.py | mosesn/pants | 7fddcc5d68272a03e9a2b4224b8da728d35eabb2 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/help/test_build_dictionary_info_extracter.py | mosesn/pants | 7fddcc5d68272a03e9a2b4224b8da728d35eabb2 | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import unittest
fro... | 34.04878 | 98 | 0.624881 |
9c56925cd7e8838c611aad58fb5a2bf28d91beb8 | 1,313 | py | Python | cairis/gui/PersonaCharacteristicDialogParameters.py | RachelLar/cairis_update | 0b1d6d17ce49bc74887d1684e28c53c1b06e2fa2 | [
"Apache-2.0"
] | null | null | null | cairis/gui/PersonaCharacteristicDialogParameters.py | RachelLar/cairis_update | 0b1d6d17ce49bc74887d1684e28c53c1b06e2fa2 | [
"Apache-2.0"
] | null | null | null | cairis/gui/PersonaCharacteristicDialogParameters.py | RachelLar/cairis_update | 0b1d6d17ce49bc74887d1684e28c53c1b06e2fa2 | [
"Apache-2.0"
] | null | null | null | # 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... | 45.275862 | 115 | 0.794364 |
97ba1ae551da9c61fb99a13a723a2fce8381e3ff | 3,180 | py | Python | sourceTransferLearn/predict.py | ZombieSocrates/ml-udacity-capstone | 621cb4896ae3ce32c0eb6ee46d4783b6b0ab4bbc | [
"MIT"
] | null | null | null | sourceTransferLearn/predict.py | ZombieSocrates/ml-udacity-capstone | 621cb4896ae3ce32c0eb6ee46d4783b6b0ab4bbc | [
"MIT"
] | null | null | null | sourceTransferLearn/predict.py | ZombieSocrates/ml-udacity-capstone | 621cb4896ae3ce32c0eb6ee46d4783b6b0ab4bbc | [
"MIT"
] | null | null | null | # import libraries
import os
import numpy as np
import torch
from six import BytesIO
from train import _get_pretrained_model
# default content type is numpy array
NP_CONTENT_TYPE = 'application/x-npy'
# Provided model load function
def model_fn(model_dir):
'''Load the PyTorch model from the `model_dir` director... | 34.193548 | 89 | 0.697484 |
b90d81514ffce5b4f88cb2c91d2960bb6c69f9f8 | 5,108 | py | Python | test/functional/feature_versionbits_warning.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 158 | 2016-01-08T10:38:37.000Z | 2022-02-01T06:28:05.000Z | test/functional/feature_versionbits_warning.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 196 | 2015-11-19T10:59:24.000Z | 2021-10-07T14:52:13.000Z | test/functional/feature_versionbits_warning.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 71 | 2016-06-25T23:29:04.000Z | 2022-03-14T10:57:19.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test version bits warning system.
Generate chains with block versions that appear to be signalling unk... | 48.647619 | 137 | 0.72083 |
b58a885afe2a27e9d952474c2192975b67ccea88 | 2,809 | py | Python | pybvc/common/result.py | brocade/pybvc | 316e8cb79ecbeb3670276afd43286e57897bc8ba | [
"BSD-3-Clause"
] | 1 | 2015-11-22T15:53:00.000Z | 2015-11-22T15:53:00.000Z | pybvc/common/result.py | brocade/pybvc | 316e8cb79ecbeb3670276afd43286e57897bc8ba | [
"BSD-3-Clause"
] | null | null | null | pybvc/common/result.py | brocade/pybvc | 316e8cb79ecbeb3670276afd43286e57897bc8ba | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2015
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in ... | 43.215385 | 80 | 0.574938 |
7f7fa17daa5a57444c3960b43e1f9f81518e3a26 | 1,992 | py | Python | scripts/rf_sys_inventory.py | billdodd/Redfish-Tacklebox | b2337e8fb33a90bef720a1b4b1149658d35c8c57 | [
"FSFAP"
] | null | null | null | scripts/rf_sys_inventory.py | billdodd/Redfish-Tacklebox | b2337e8fb33a90bef720a1b4b1149658d35c8c57 | [
"FSFAP"
] | null | null | null | scripts/rf_sys_inventory.py | billdodd/Redfish-Tacklebox | b2337e8fb33a90bef720a1b4b1149658d35c8c57 | [
"FSFAP"
] | null | null | null | #! /usr/bin/python
# Copyright Notice:
# Copyright 2019-2020 DMTF. All rights reserved.
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Tacklebox/blob/master/LICENSE.md
"""
Redfish System Inventory
File : rf_sys_inventory.py
Brief : This script uses the redfish_utilities modu... | 43.304348 | 205 | 0.73494 |
87136594fdb7bc800b5cc6758c18fde8b765f9cc | 5,994 | py | Python | spoopy/tools/classifier/keras_to_tensorflow.py | rodrigobressan/PADify | 362db2b3a33793ac53f938e89f90a6ecdf778e89 | [
"MIT"
] | 12 | 2019-11-26T07:44:08.000Z | 2021-03-03T09:51:43.000Z | spoopy/tools/classifier/keras_to_tensorflow.py | rodrigobressan/PADify | 362db2b3a33793ac53f938e89f90a6ecdf778e89 | [
"MIT"
] | 13 | 2020-01-28T22:09:41.000Z | 2022-03-11T23:43:37.000Z | spoopy/tools/classifier/keras_to_tensorflow.py | rodrigobressan/PADify | 362db2b3a33793ac53f938e89f90a6ecdf778e89 | [
"MIT"
] | 5 | 2020-01-02T09:52:42.000Z | 2022-02-21T15:45:23.000Z |
# coding: utf-8
# In[ ]:
"""
Copyright (c) 2017, by the Authors: Amir H. Abdi
This software is freely available under the MIT Public License.
Please see the License file in the root for details.
The following code snippet will convert the keras model file,
which is saved using model.save('kerasmodel_weight_file'),
... | 37 | 112 | 0.737905 |
c570d0871eb27d3607cdd05fbe0218ffd36b9a2e | 35,599 | py | Python | stp_zmq/zstack.py | evernym/indy-plenum | dc390caa16c0b15dcc549d557ede6f64c0c1b842 | [
"Apache-2.0"
] | null | null | null | stp_zmq/zstack.py | evernym/indy-plenum | dc390caa16c0b15dcc549d557ede6f64c0c1b842 | [
"Apache-2.0"
] | null | null | null | stp_zmq/zstack.py | evernym/indy-plenum | dc390caa16c0b15dcc549d557ede6f64c0c1b842 | [
"Apache-2.0"
] | 2 | 2017-12-13T21:14:54.000Z | 2021-06-06T15:48:03.000Z | import inspect
from stp_core.common.config.util import getConfig
from stp_core.common.constants import CONNECTION_PREFIX, ZMQ_NETWORK_PROTOCOL
try:
import ujson as json
except ImportError:
import json
import os
import shutil
import sys
import time
from binascii import hexlify, unhexlify
from collections impo... | 36.662204 | 98 | 0.588977 |
8fafc980483716b2f561897225c875112500b245 | 1,416 | py | Python | new_paper_summary.py | KissyZhou/KissyZhou.github.io | 1a1e5aa619de08b60ea0e4bb3a12673b4043c183 | [
"MIT"
] | null | null | null | new_paper_summary.py | KissyZhou/KissyZhou.github.io | 1a1e5aa619de08b60ea0e4bb3a12673b4043c183 | [
"MIT"
] | null | null | null | new_paper_summary.py | KissyZhou/KissyZhou.github.io | 1a1e5aa619de08b60ea0e4bb3a12673b4043c183 | [
"MIT"
] | null | null | null | # Patrick Emami
#
# Generates the boiler-plate for a new paper summary
import datetime
import os
if __name__ == '__main__':
# Find out the topic
topic_code = input("What topic does this paper fall under?\n\t(1) AGI\n\t(2) computer vision\n\t(3) deep learning theory\n\t(4) deep RL\n\t(5) general ML\n\t(6) GANs... | 32.930233 | 201 | 0.60452 |
abf289e47fa34a45cf4240cd87e1456a122456e6 | 3,011 | py | Python | scripts/mactool.py | westurner/dotfiles | 92316b97a99677b345f9dfe15f5e4f7dd5c7218a | [
"BSD-3-Clause"
] | 31 | 2015-03-07T13:23:37.000Z | 2021-04-30T07:44:07.000Z | scripts/mactool.py | westurner/dotfiles | 92316b97a99677b345f9dfe15f5e4f7dd5c7218a | [
"BSD-3-Clause"
] | 36 | 2015-01-01T02:07:47.000Z | 2021-05-13T19:39:12.000Z | scripts/mactool.py | westurner/dotfiles | 92316b97a99677b345f9dfe15f5e4f7dd5c7218a | [
"BSD-3-Clause"
] | 6 | 2015-01-26T23:09:46.000Z | 2020-10-03T04:43:18.000Z | #!/usr/bin/env python
from os import getenv
from random import randrange,seed
import sys
if sys.version_info.major > 2:
from urllib.request import urlopen
else:
from urllib import urlopen
_OUI_URL = "http://standards.ieee.org/regauth/oui/oui.txt"
_MACFILE = "%s/.macvendors" % getenv("HOME")
_V_VMWARE = '00:... | 27.87963 | 79 | 0.589837 |
8a8ae0435414460b04a9b9841f41c8c91f162381 | 24,578 | py | Python | canned_http.py | mgp/canned-http | dade87ae512f06abf865641ec4cea86607b24cca | [
"MIT"
] | 1 | 2017-01-09T18:37:04.000Z | 2017-01-09T18:37:04.000Z | canned_http.py | mgp/canned-http | dade87ae512f06abf865641ec4cea86607b24cca | [
"MIT"
] | null | null | null | canned_http.py | mgp/canned-http | dade87ae512f06abf865641ec4cea86607b24cca | [
"MIT"
] | null | null | null | """A web server that accepts HTTP requests from a client, verifies that each
request contains some expected values, and returns canned responses for the
requests. The expected values in the requests and the canned responses are
specified by a script that is provided when the web server is run.
For requests, the script... | 37.126888 | 89 | 0.695093 |
9721fffc15f2c57f19b24cf0fb6619bc0ada91c0 | 84 | py | Python | fpipe/meta/blocksize.py | vkvam/fpipe | 2905095f46923c6c4c460c3d154544b654136df4 | [
"MIT"
] | 18 | 2019-12-16T17:55:57.000Z | 2020-10-21T23:25:40.000Z | fpipe/meta/blocksize.py | vkvam/fpipe | 2905095f46923c6c4c460c3d154544b654136df4 | [
"MIT"
] | 23 | 2019-12-11T14:15:08.000Z | 2020-02-17T12:53:21.000Z | fpipe/meta/blocksize.py | vkvam/fpipe | 2905095f46923c6c4c460c3d154544b654136df4 | [
"MIT"
] | null | null | null | from fpipe.meta.abstract import FileData
class BlockSize(FileData[int]):
pass
| 14 | 40 | 0.761905 |
c2fa921dc92ca053397520e6bc5d6722598844cc | 557 | py | Python | Python Files/pickle1.py | Nmane1612/Nihar-Mane | aa4db52a384f706a431c994e4e12d8e5e0cd8402 | [
"Apache-2.0"
] | 3 | 2019-12-27T06:07:37.000Z | 2020-07-01T08:51:32.000Z | Python Files/pickle1.py | Nihar16/Personal-Repository | 0d319eeb8dbfa3f7c3eb8501829939ecd6923464 | [
"MIT"
] | null | null | null | Python Files/pickle1.py | Nihar16/Personal-Repository | 0d319eeb8dbfa3f7c3eb8501829939ecd6923464 | [
"MIT"
] | null | null | null | import pickle
class Human:
def __init__(self):
self.name=input("Enter your name : ")
self.age=input("Enter your age : ")
def disp(self):
print("Hello {}, You are {} year old!".format(self.name,self.age))
with open("Human.dat", "wb") as f:
insaan=Human()
pickle.dump(ins... | 24.217391 | 75 | 0.533214 |
03c52e6274b93da20235aa84376f605ad17a2f0e | 10,488 | py | Python | bumps/lsqerror.py | e-rus/bumps | 080ff80f939f3edf54a1fdc425e3f333d42ee8c4 | [
"MIT"
] | null | null | null | bumps/lsqerror.py | e-rus/bumps | 080ff80f939f3edf54a1fdc425e3f333d42ee8c4 | [
"MIT"
] | null | null | null | bumps/lsqerror.py | e-rus/bumps | 080ff80f939f3edf54a1fdc425e3f333d42ee8c4 | [
"MIT"
] | null | null | null | r"""
Least squares error analysis.
Given a data set with gaussian uncertainty on the points, and a model which
is differentiable at the minimum, the parameter uncertainty can be estimated
from the covariance matrix at the minimum. The model and data are wrapped in
a problem object, which must define the following met... | 32.073394 | 96 | 0.617849 |
15a3b691f3c2c5cca60cfc69d2db93f09b5e997a | 340 | py | Python | caddy-gen/src/config.py | ElectronicElephant/mirror-docker-unified | d8d006fd19a7d7ef497bc025665fc7ff6fec53f9 | [
"Apache-2.0"
] | 16 | 2020-11-03T03:14:02.000Z | 2021-02-06T11:21:41.000Z | caddy-gen/src/config.py | ElectronicElephant/mirror-docker-unified | d8d006fd19a7d7ef497bc025665fc7ff6fec53f9 | [
"Apache-2.0"
] | 34 | 2020-11-02T15:57:46.000Z | 2021-02-11T03:11:32.000Z | caddy-gen/src/config.py | ElectronicElephant/mirror-docker-unified | d8d006fd19a7d7ef497bc025665fc7ff6fec53f9 | [
"Apache-2.0"
] | 4 | 2021-03-30T06:54:37.000Z | 2022-01-09T10:17:57.000Z | BASES = {
"siyuan": ['mirror.sjtu.edu.cn'],
"zhiyuan": ['mirrors.sjtug.sjtu.edu.cn'],
"local": [':80']
}
LUG_ADDR = 'lug:7001'
SPEEDTEST_ADDR = 'speedtest:8989'
FRONTEND_DIR = '/dists'
NODE_EXPORTER_ADDR = '172.31.0.1:9100'
CADVISOR_ADDR = 'cadvisor:8080'
MIRROR_INTEL_ADDR = 'mirror-intel:8000'
LUG_EXPORTE... | 24.285714 | 45 | 0.676471 |
86454be8ba6b4e73605bc34fbadbb56e722a2deb | 5,211 | py | Python | automation/services/coda-user-agent/agent.py | arjundashrath/mina | 629c6d767fbf2fdb7ce1ebd04337960c6f5baf55 | [
"Apache-2.0"
] | 929 | 2020-10-02T07:23:16.000Z | 2022-03-31T15:02:09.000Z | automation/services/coda-user-agent/agent.py | arjundashrath/mina | 629c6d767fbf2fdb7ce1ebd04337960c6f5baf55 | [
"Apache-2.0"
] | 3,154 | 2020-09-29T15:47:44.000Z | 2022-03-31T16:22:28.000Z | automation/services/coda-user-agent/agent.py | arjundashrath/mina | 629c6d767fbf2fdb7ce1ebd04337960c6f5baf55 | [
"Apache-2.0"
] | 216 | 2020-09-29T19:47:41.000Z | 2022-03-27T08:44:29.000Z | from CodaClient import Client, Currency, CurrencyFormat
import os
import schedule
import time
import urllib3
import random
from requests.exceptions import ConnectionError
from prometheus_client import Counter, start_http_server
def getenv_default_map(env_var: str, f, default):
value = os.getenv(env_var)
if val... | 40.395349 | 195 | 0.701401 |
aabeb2024104aa7b0084645d68d6a99243fbf766 | 3,992 | py | Python | dialogue-engine/test/programytest/config/brain/test_services.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 104 | 2020-03-30T09:40:00.000Z | 2022-03-06T22:34:25.000Z | dialogue-engine/test/programytest/config/brain/test_services.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 25 | 2020-06-12T01:36:35.000Z | 2022-02-19T07:30:44.000Z | dialogue-engine/test/programytest/config/brain/test_services.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 10 | 2020-04-02T23:43:56.000Z | 2021-05-14T13:47:01.000Z | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | 43.391304 | 126 | 0.693888 |
d6d73857f6c360a07d370d03e4f7452d9cfab30f | 828 | py | Python | Python/OOP/abstract.py | salikansari6/interview-prep | 17e98fbb15f87c9f2ecd293896e613f5fe01d3a3 | [
"MIT"
] | 1 | 2021-08-23T18:18:41.000Z | 2021-08-23T18:18:41.000Z | Python/OOP/abstract.py | salikansari6/interview-prep | 17e98fbb15f87c9f2ecd293896e613f5fe01d3a3 | [
"MIT"
] | null | null | null | Python/OOP/abstract.py | salikansari6/interview-prep | 17e98fbb15f87c9f2ecd293896e613f5fe01d3a3 | [
"MIT"
] | 1 | 2021-08-24T15:40:15.000Z | 2021-08-24T15:40:15.000Z | from abc import ABC, abstractmethod
class Computer(ABC):
@abstractmethod
def process(self):
pass
class Laptop(Computer):
def process(self):
print("running")
# com = Computer() => TypeError: Can't instantiate abstract class Computer with abstract methods process
com = Laptop()
com.proce... | 12.545455 | 104 | 0.614734 |
af67a4bfb7306e2100da84d0dda7f109248bbb03 | 6,444 | py | Python | radon_transformation/radon.py | drgHannah/Radon-Transformation | 68eac9c3c4747b0c1580be83b5967b0c58d028be | [
"MIT"
] | 1 | 2022-03-29T06:19:36.000Z | 2022-03-29T06:19:36.000Z | radon_transformation/radon.py | drgHannah/Radon-Transformation | 68eac9c3c4747b0c1580be83b5967b0c58d028be | [
"MIT"
] | null | null | null | radon_transformation/radon.py | drgHannah/Radon-Transformation | 68eac9c3c4747b0c1580be83b5967b0c58d028be | [
"MIT"
] | null | null | null | '''
File name: radon.py
Author: Hannah Dröge
Date created: 4/22/2021
Python Version: 3.6
'''
import torch
import numpy as np
import matplotlib.pyplot as plt
from radon_transformation.filter import rampfilter
class radon(torch.nn.Module):
'''
Radon Transformation
Args:
n_angles (i... | 42.117647 | 163 | 0.640596 |
3a24c2fc043c07f6f026f0f9aa53af4710becf01 | 1,170 | py | Python | Scripts/changeFont_interactive.py | Ifelsethendo/Blender-Game-Engine-Templates | b4cd92ee7e1c4e9ac8d10b4d843392856285f6ba | [
"Apache-2.0"
] | 5 | 2021-12-11T02:27:43.000Z | 2022-01-08T08:51:21.000Z | Scripts/changeFont_interactive.py | Ifelsethendo/Blender-Game-Engine-Templates | b4cd92ee7e1c4e9ac8d10b4d843392856285f6ba | [
"Apache-2.0"
] | null | null | null | Scripts/changeFont_interactive.py | Ifelsethendo/Blender-Game-Engine-Templates | b4cd92ee7e1c4e9ac8d10b4d843392856285f6ba | [
"Apache-2.0"
] | 2 | 2021-12-29T05:48:58.000Z | 2022-03-05T15:31:33.000Z | import bpy
import glob
import bge
import os
## get a list of all the fonts installed on Windows modify for your OS or font directory
fontList = glob.glob("C:\\Windows\\Fonts\\*.ttf")
## define this scripted text object to the game engine
scene = bge.logic.getCurrentScene()
cont = bge.logic.getCurrentController()
Text... | 36.5625 | 88 | 0.618803 |
90d5d107294a7fdbf61ee095c8fc4ed4b58f0fd9 | 7,623 | py | Python | neko3/features/noaa/cog.py | Natsurii/nicabot-monkee | 0f32132184c31bea0015f232c0abf3ec993129fa | [
"MIT"
] | null | null | null | neko3/features/noaa/cog.py | Natsurii/nicabot-monkee | 0f32132184c31bea0015f232c0abf3ec993129fa | [
"MIT"
] | null | null | null | neko3/features/noaa/cog.py | Natsurii/nicabot-monkee | 0f32132184c31bea0015f232c0abf3ec993129fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Nekozilla is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Nekozilla is distributed... | 43.56 | 116 | 0.663912 |
87ef235f8847c4918c92f2cd34920503416d4a1f | 2,211 | py | Python | scripts/slave/recipe_modules/perf_dashboard/example.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipe_modules/perf_dashboard/example.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipe_modules/perf_dashboard/example.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T11:05:06.000Z | 2020-07-23T11:05:06.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'perf_dashboard',
'recipe_engine/path',
'recipe_engine/json',
'recipe_engine/platform',
'recipe_engine/properties',
'recipe_... | 31.585714 | 80 | 0.587517 |
f2b7b49c1d98c4f9bae84a6ace3357fe904739f4 | 115 | py | Python | 2019/07/27/Django Example App - YouTube Search With YouTube Data API/django_youtube_search/youtube_search/search/urls.py | kenjitagawa/youtube_video_code | ef3c48b9e136b3745d10395d94be64cb0a1f1c97 | [
"Unlicense"
] | 492 | 2019-06-25T12:54:31.000Z | 2022-03-30T12:38:28.000Z | 2019/07/27/Django Example App - YouTube Search With YouTube Data API/django_youtube_search/youtube_search/search/urls.py | kenjitagawa/youtube_video_code | ef3c48b9e136b3745d10395d94be64cb0a1f1c97 | [
"Unlicense"
] | 23 | 2019-10-01T01:36:08.000Z | 2022-02-10T12:46:16.000Z | 2019/07/27/Django Example App - YouTube Search With YouTube Data API/django_youtube_search/youtube_search/search/urls.py | kenjitagawa/youtube_video_code | ef3c48b9e136b3745d10395d94be64cb0a1f1c97 | [
"Unlicense"
] | 1,734 | 2019-06-03T06:25:13.000Z | 2022-03-31T23:57:53.000Z | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
| 16.428571 | 41 | 0.634783 |
4911b800835f8b5fe59e9e970e29d5a5708dd7ca | 3,116 | py | Python | Constructs/pd1_extracellular.py | amrosado/SequenceTools | f971b092bd3273a131157c4abe1c73d7c505d11e | [
"MIT"
] | 2 | 2020-05-11T02:16:49.000Z | 2020-09-07T08:41:53.000Z | Constructs/pd1_extracellular.py | amrosado/SequenceTools | f971b092bd3273a131157c4abe1c73d7c505d11e | [
"MIT"
] | null | null | null | Constructs/pd1_extracellular.py | amrosado/SequenceTools | f971b092bd3273a131157c4abe1c73d7c505d11e | [
"MIT"
] | null | null | null | from SequenceTools import SequenceTools
tools = SequenceTools(email="arosado@gatech.edu")
tools.import_sequence_by_ncbi_identifier("NM_008798.2")
tools.deconstruct_imported_cdna_sequence(tools.all_sequences["NM_008798.2"], "NM_008798.2", 288)
tools.make_new_deconstructed_sequence_from_deconstructed_sequence_peptide_ra... | 62.32 | 348 | 0.861361 |
7ef08ac4996a19e922cba380f6022fc6aea673a7 | 25,573 | py | Python | tfx_bsl/arrow/array_util_test.py | busunkim96/tfx-bsl | 17b5e8b95acf4ac5fada640789409cb356ebebed | [
"Apache-2.0"
] | null | null | null | tfx_bsl/arrow/array_util_test.py | busunkim96/tfx-bsl | 17b5e8b95acf4ac5fada640789409cb356ebebed | [
"Apache-2.0"
] | null | null | null | tfx_bsl/arrow/array_util_test.py | busunkim96/tfx-bsl | 17b5e8b95acf4ac5fada640789409cb356ebebed | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.224163 | 96 | 0.600594 |
35bf50c60d9148adb0236eba09a416b571711eda | 1,677 | py | Python | aliyun-python-sdk-devops-rdc/aliyunsdkdevops_rdc/request/v20200303/GetPipelineInstanceInfoRequest.py | liuzheng/aliyun-openapi-python-sdk | 1ba6743f3d6f2cef57ec9e3be1754b04293c3150 | [
"Apache-2.0"
] | 1 | 2021-03-08T02:59:17.000Z | 2021-03-08T02:59:17.000Z | aliyun-python-sdk-devops-rdc/aliyunsdkdevops_rdc/request/v20200303/GetPipelineInstanceInfoRequest.py | bricklayer-Liu/aliyun-openapi-python-sdk | 20da2554de22679fc7c5462c483663e4d79512aa | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-devops-rdc/aliyunsdkdevops_rdc/request/v20200303/GetPipelineInstanceInfoRequest.py | bricklayer-Liu/aliyun-openapi-python-sdk | 20da2554de22679fc7c5462c483663e4d79512aa | [
"Apache-2.0"
] | null | null | null | # 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 u... | 33.54 | 83 | 0.759094 |
733193d63d6cd075cb413a9d32cf99d43315d09d | 1,467 | py | Python | utils.py | RafayGhafoor/PTCL-Router-CLI | 6d75ba31e356af9c32a3fdb50df83f7cf31f6719 | [
"MIT"
] | 7 | 2018-11-17T07:18:49.000Z | 2020-01-28T17:19:07.000Z | utils.py | RafayGhafoor/PTCL-Router-CLI | 6d75ba31e356af9c32a3fdb50df83f7cf31f6719 | [
"MIT"
] | null | null | null | utils.py | RafayGhafoor/PTCL-Router-CLI | 6d75ba31e356af9c32a3fdb50df83f7cf31f6719 | [
"MIT"
] | 3 | 2018-12-30T15:35:25.000Z | 2020-10-10T22:58:00.000Z | import re
mac_pattern = re.compile(u'^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$')
def validate_gateway(gateway):
if not re.search("https?://", gateway) and not gateway.endswith('/'):
return True
return False
def convert_time(start_time="1", end_time="23:59"):
# TODO : Add test that the numbe... | 35.780488 | 94 | 0.563736 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.