hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3e2c0eb8c6d9e98c71662541c6772d31530d3d78 | 11,259 | py | Python | tests/gpflow/test_mean_functions.py | joelberkeley/GPflow | 78230b98f57c64b5ee2932ea0d2752eb9ff102ce | [
"Apache-2.0"
] | null | null | null | tests/gpflow/test_mean_functions.py | joelberkeley/GPflow | 78230b98f57c64b5ee2932ea0d2752eb9ff102ce | [
"Apache-2.0"
] | null | null | null | tests/gpflow/test_mean_functions.py | joelberkeley/GPflow | 78230b98f57c64b5ee2932ea0d2752eb9ff102ce | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 the GPflow 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 writi... | 35.971246 | 100 | 0.69198 |
a888213ab4b24637d6b4c02f68e343101bb85bd1 | 6,863 | py | Python | Practicas/Practica_08/codigoFuente/src/relativos.py | CodeRevenge/Proyecto-seminario-traductores-i | a5c6a500a6be8d5a1b24b4ecacd73e6f67a34041 | [
"MIT"
] | null | null | null | Practicas/Practica_08/codigoFuente/src/relativos.py | CodeRevenge/Proyecto-seminario-traductores-i | a5c6a500a6be8d5a1b24b4ecacd73e6f67a34041 | [
"MIT"
] | null | null | null | Practicas/Practica_08/codigoFuente/src/relativos.py | CodeRevenge/Proyecto-seminario-traductores-i | a5c6a500a6be8d5a1b24b4ecacd73e6f67a34041 | [
"MIT"
] | null | null | null | from baseconvert import base
from bitstring import Bits
from src.crearContLoc import ContadorLocalidades
from src.funcionalidades import Funcionalidad
class Relativos(ContadorLocalidades):
def __init__(self):
ContadorLocalidades.__init__(self)
Funcionalidad.__init__(self)
self.RELATIVO = '... | 39.901163 | 138 | 0.567827 |
e5bdd3d4ecb3169c3e2117c8ae3655100c1cd695 | 7,561 | py | Python | src/sentry/utils/sdk.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | src/sentry/utils/sdk.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/utils/sdk.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 1 | 2020-08-10T07:55:40.000Z | 2020-08-10T07:55:40.000Z | from __future__ import absolute_import, print_function
import inspect
import json
import logging
import six
import zlib
from django.conf import settings
from django.utils.functional import cached_property
import sentry_sdk
from sentry_sdk.client import get_options
from sentry_sdk.transport import Transport, make_tr... | 33.30837 | 94 | 0.642904 |
384ec5faa303886e06a0914818d2115c77a0cdc9 | 394 | py | Python | modulo_2/cap2-Decisoes/variaveis2.py | PPedriniHp/Fiap_on_Phyton | fe06cfc931cd038dfed8c14394336f69dc953926 | [
"MIT"
] | null | null | null | modulo_2/cap2-Decisoes/variaveis2.py | PPedriniHp/Fiap_on_Phyton | fe06cfc931cd038dfed8c14394336f69dc953926 | [
"MIT"
] | null | null | null | modulo_2/cap2-Decisoes/variaveis2.py | PPedriniHp/Fiap_on_Phyton | fe06cfc931cd038dfed8c14394336f69dc953926 | [
"MIT"
] | null | null | null | responsavel=input("Digite o nome do responsável: ")
funcionario=input("Digite o nome do funcionário: ")
evento=input("Digite o nome do evento: ")
valor=float(input("Digite o valor que será ressarcido: "))
print("Declaro para o senhor " + responsavel + ", que o senhor " + funcionario + " esteve presente no evento " +
... | 56.285714 | 112 | 0.690355 |
8e6a3d41e523e8eedcfde98f6891c844b1c9696d | 8,891 | py | Python | torchelie/recipes/pix2pix.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | torchelie/recipes/pix2pix.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | torchelie/recipes/pix2pix.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | from typing import Tuple
import copy
import os
import torch
import torchelie as tch
import torchelie.utils as tu
from torchelie.recipes.gan import GANRecipe
from torchelie.transforms import MultiBranch
import torchvision.transforms as TF
import torchelie.loss.gan.standard as gan_loss
from torchelie.loss.gan.penalty imp... | 34.328185 | 80 | 0.499606 |
dc478c811a1cd0ae79aba1312a88de5d31cffaea | 448 | py | Python | main.py | Glados59/LAU-Net | 928955e12a6786a84949336c7dc07b90f2cfffe0 | [
"Apache-2.0"
] | 26 | 2021-03-22T15:57:28.000Z | 2022-03-30T03:07:09.000Z | main.py | Glados59/LAU-Net | 928955e12a6786a84949336c7dc07b90f2cfffe0 | [
"Apache-2.0"
] | 4 | 2021-07-06T07:37:20.000Z | 2022-01-07T08:02:51.000Z | main.py | Glados59/LAU-Net | 928955e12a6786a84949336c7dc07b90f2cfffe0 | [
"Apache-2.0"
] | 4 | 2021-08-23T05:49:11.000Z | 2022-03-08T00:54:52.000Z | import utility
import data
import model
from option import args
from checkpoint import Checkpoint
from trainer import Trainer
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
utility.set_seed(args.seed)
checkpoint = Checkpoint(args)
if checkpoint.ok:
loader = data.Data(args)
model = model.Model(args, check... | 20.363636 | 54 | 0.736607 |
8a88a03ca6f8e015671056f42484f88103a3aa6b | 1,938 | py | Python | ExtraModules/phonenumbers/data/region_BS.py | chirantana-trust/web-chirantana | 18e2fb105fc5a9f55586c55096780c062ad9f2bc | [
"Unlicense"
] | 1 | 2015-01-31T01:17:14.000Z | 2015-01-31T01:17:14.000Z | ExtraModules/phonenumbers/data/region_BS.py | chirantana-trust/web-chirantana | 18e2fb105fc5a9f55586c55096780c062ad9f2bc | [
"Unlicense"
] | null | null | null | ExtraModules/phonenumbers/data/region_BS.py | chirantana-trust/web-chirantana | 18e2fb105fc5a9f55586c55096780c062ad9f2bc | [
"Unlicense"
] | null | null | null | """Auto-generated file, do not edit by hand. BS metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_BS = PhoneMetadata(id='BS', country_code=1, international_prefix='011',
general_desc=PhoneNumberDesc(national_number_pattern='[2589]\\d{9}', possible_number_pattern='\... | 96.9 | 258 | 0.732198 |
527d2b739e2dbb064d8b197e3e775eab16bd1c61 | 9,467 | py | Python | 3601-2019-Herrick/modules/Analysis.AnalyticsModule/sascyber/configs/base.py | brgaines/sas-global-forum-2019 | e5dcad6f5ac0cc800a2e0aeb25ee770ba0048d99 | [
"Apache-2.0"
] | 37 | 2019-01-31T19:42:24.000Z | 2021-12-07T09:35:03.000Z | 3601-2019-Herrick/modules/Analysis.AnalyticsModule/sascyber/configs/base.py | brgaines/sas-global-forum-2019 | e5dcad6f5ac0cc800a2e0aeb25ee770ba0048d99 | [
"Apache-2.0"
] | 6 | 2019-02-08T20:33:27.000Z | 2019-04-30T12:13:38.000Z | 3601-2019-Herrick/modules/Analysis.AnalyticsModule/sascyber/configs/base.py | brgaines/sas-global-forum-2019 | e5dcad6f5ac0cc800a2e0aeb25ee770ba0048d99 | [
"Apache-2.0"
] | 46 | 2019-02-08T19:17:22.000Z | 2021-01-18T01:04:18.000Z | # encoding: utf-8
#
# Copyright SAS Institute
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.039344 | 110 | 0.650893 |
7a34170464590a8be7383701e8a86a8e27fbb024 | 1,446 | py | Python | API/v1/VDI/list.py | Alex4386/XenXenXenSe | c60e50f26a7c3b306ee3cbb140b3ad7f39c21d93 | [
"MIT"
] | 1 | 2021-04-23T08:56:05.000Z | 2021-04-23T08:56:05.000Z | API/v1/VDI/list.py | Alex4386/XenXenXenSe | c60e50f26a7c3b306ee3cbb140b3ad7f39c21d93 | [
"MIT"
] | null | null | null | API/v1/VDI/list.py | Alex4386/XenXenXenSe | c60e50f26a7c3b306ee3cbb140b3ad7f39c21d93 | [
"MIT"
] | null | null | null | from http.client import RemoteDisconnected
from xmlrpc.client import Fault
from fastapi import APIRouter, HTTPException
from XenGarden.session import create_session
from XenGarden.VDI import VDI
from API.v1.model.vdi import VDLResponseModel
from API.v1.VDI.serialize import serialize
from app.settings import Settings
... | 29.510204 | 76 | 0.658368 |
56f3547a1d3d637949f7b63d686617b9f27b1872 | 46,976 | py | Python | Dialogue_lib/DialogueActor/liststructure.py | ZhenshengLee/zsLV | 0e2fb01fcc3f373c4b7be97c1c01ebdf15e4b9c3 | [
"Apache-2.0"
] | 3 | 2016-10-16T11:23:49.000Z | 2019-06-30T00:58:16.000Z | Dialogue_lib/DialogueActor/liststructure.py | ZhenshengLee/zsLV | 0e2fb01fcc3f373c4b7be97c1c01ebdf15e4b9c3 | [
"Apache-2.0"
] | null | null | null | Dialogue_lib/DialogueActor/liststructure.py | ZhenshengLee/zsLV | 0e2fb01fcc3f373c4b7be97c1c01ebdf15e4b9c3 | [
"Apache-2.0"
] | 1 | 2019-08-25T13:40:37.000Z | 2019-08-25T13:40:37.000Z | #coding:utf-8
#分词与词性标注 以json格式输出
import urllib2,urllib,sys,os
import codecs,re,string,json
from subprocess import *
from collections import Counter
import mdptoolbox
from numpy import *
import aiml
def divPos(input):
uri_base = "http://api.ltp-cloud.com/analysis/"
api_key = "98H7b393hUPX5tQwEgXwpgPc6m0c1jLTV... | 41.571681 | 6,080 | 0.51869 |
a1c4c6b67046bc831a95cb094736b35877f4d8cd | 11,777 | py | Python | fedml_api/standalone/fedavg_affinity/fedavg_api.py | forestnoobie/FedML | 266c10ac96a0ab35aff73dc12d8afe84da625c75 | [
"Apache-2.0"
] | null | null | null | fedml_api/standalone/fedavg_affinity/fedavg_api.py | forestnoobie/FedML | 266c10ac96a0ab35aff73dc12d8afe84da625c75 | [
"Apache-2.0"
] | null | null | null | fedml_api/standalone/fedavg_affinity/fedavg_api.py | forestnoobie/FedML | 266c10ac96a0ab35aff73dc12d8afe84da625c75 | [
"Apache-2.0"
] | null | null | null | import copy
import logging
import random
import numpy as np
import torch
import wandb
from fedml_api.standalone.fedavg_affinity.client import Client
class FedAvgAPI(object):
def __init__(self, dataset, device, args, model_trainer):
self.device = device
self.args = args
[train_data_num, t... | 46.920319 | 144 | 0.624862 |
95d6e5a93772ac50ec226bbfce6cded1721c1a7b | 628 | py | Python | pandas_ta/momentum/__init__.py | YuvalWein/pandas-ta | 5c4a72ee993fe556c4e05590e1b5ee70d221889a | [
"MIT"
] | 1 | 2020-06-18T10:19:12.000Z | 2020-06-18T10:19:12.000Z | pandas_ta/momentum/__init__.py | ajmal017/pandas-ta | 98099f71de7c4a8b293b8de4dd62fa2399e5a12a | [
"MIT"
] | null | null | null | pandas_ta/momentum/__init__.py | ajmal017/pandas-ta | 98099f71de7c4a8b293b8de4dd62fa2399e5a12a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .ao import ao
from .apo import apo
from .bias import bias
from .bop import bop
from .brar import brar
from .cci import cci
from .cg import cg
from .cmo import cmo
from .coppock import coppock
from .fisher import fisher
from .inertia import inertia
from .kdj import kdj
from .kst import kst
f... | 22.428571 | 28 | 0.764331 |
7ae9aacb98b3d2ce39dd4deac59730b0ccdbbabe | 823 | py | Python | src/chemphys/urls.py | Nnonexistent/chemphys | d2f34364d006a494bb965bb83d1967d7dd56f9ba | [
"MIT"
] | null | null | null | src/chemphys/urls.py | Nnonexistent/chemphys | d2f34364d006a494bb965bb83d1967d7dd56f9ba | [
"MIT"
] | 19 | 2015-03-08T08:46:09.000Z | 2019-10-01T05:16:43.000Z | src/chemphys/urls.py | Nnonexistent/chemphys | d2f34364d006a494bb965bb83d1967d7dd56f9ba | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings
urlpatterns = patterns(
'', # prefix
url(r'^i18n/setlang/$', 'chemphys.views.set_language_ex'), # override django.views.i18n.set_language
url(r'^i18n/', include('django.conf.urls.i18n')... | 34.291667 | 105 | 0.676792 |
f38e9ec7371a18db36911d05f0fad5dcc1349918 | 9,611 | py | Python | nbviewer/providers/local/handlers.py | tashay/nbviewer | 51317e6185cc606495b29062f15c9bf08477162c | [
"BSD-3-Clause-Clear"
] | null | null | null | nbviewer/providers/local/handlers.py | tashay/nbviewer | 51317e6185cc606495b29062f15c9bf08477162c | [
"BSD-3-Clause-Clear"
] | null | null | null | nbviewer/providers/local/handlers.py | tashay/nbviewer | 51317e6185cc606495b29062f15c9bf08477162c | [
"BSD-3-Clause-Clear"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------... | 34.571942 | 102 | 0.556862 |
7514a0c0ccf00949a21497379d66530b377d1093 | 14,658 | py | Python | intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_ext.py | Stienvdh/statrick | 7b092fc42171e226718a70a285a4b323f2f395ad | [
"MIT"
] | null | null | null | intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_ext.py | Stienvdh/statrick | 7b092fc42171e226718a70a285a4b323f2f395ad | [
"MIT"
] | null | null | null | intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_ext.py | Stienvdh/statrick | 7b092fc42171e226718a70a285a4b323f2f395ad | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: Ansible Project
# 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
DOCUMENTATION = r'''
---
module: postgresql_ext
short_description: ... | 32.939326 | 129 | 0.648792 |
e08cf217df3c4e9b8b60ef20d7c5504d85cc58ec | 2,773 | py | Python | tests/cli/test_incorrect_calls.py | evhart/nasty | 1b14977d1ba61bdb78d0906c76dd57242a8c8923 | [
"Apache-2.0"
] | 49 | 2019-11-30T15:04:08.000Z | 2022-01-14T08:25:29.000Z | tests/cli/test_incorrect_calls.py | evhart/nasty | 1b14977d1ba61bdb78d0906c76dd57242a8c8923 | [
"Apache-2.0"
] | 16 | 2019-12-06T19:10:07.000Z | 2020-12-05T09:40:45.000Z | tests/cli/test_incorrect_calls.py | evhart/nasty | 1b14977d1ba61bdb78d0906c76dd57242a8c8923 | [
"Apache-2.0"
] | 8 | 2020-04-16T11:38:52.000Z | 2021-07-21T09:17:01.000Z | #
# Copyright 2019-2020 Lukas Schmelzeisen
#
# 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... | 35.101266 | 75 | 0.636855 |
cd36cc426e980ff3cbf1e3904a811f0bdf207258 | 210 | py | Python | BasicPrograms/isComposite.py | shelcia/InterviewQuestionPython | c1bff9598da01e3b75472e78f7a1b28fdcb2d935 | [
"Apache-2.0"
] | 1 | 2020-09-30T19:06:15.000Z | 2020-09-30T19:06:15.000Z | BasicPrograms/isComposite.py | shelcia/InterviewQuestionPython | c1bff9598da01e3b75472e78f7a1b28fdcb2d935 | [
"Apache-2.0"
] | null | null | null | BasicPrograms/isComposite.py | shelcia/InterviewQuestionPython | c1bff9598da01e3b75472e78f7a1b28fdcb2d935 | [
"Apache-2.0"
] | null | null | null | # TO CHECK IF IT IS A COMPOSITE NUMBER
N = int(input(""))
count = 0
# SRTICT DIVISION
for i in range(2, N//2):
if(N % i == 0):
count = count+1
if(count == 0):
print("no")
else:
print("yes")
| 17.5 | 38 | 0.547619 |
161c39416cfa2810137d1f1c5458255229601570 | 2,749 | py | Python | nglview/layout.py | vhorvath/nglview | 7e31c40efe6cfc45e04d6374dc6a43fd62e68b90 | [
"MIT"
] | 161 | 2020-07-28T14:05:57.000Z | 2022-03-31T08:38:06.000Z | nglview/layout.py | vhorvath/nglview | 7e31c40efe6cfc45e04d6374dc6a43fd62e68b90 | [
"MIT"
] | 123 | 2020-07-27T15:02:27.000Z | 2022-03-30T18:31:51.000Z | nglview/layout.py | vhorvath/nglview | 7e31c40efe6cfc45e04d6374dc6a43fd62e68b90 | [
"MIT"
] | 42 | 2020-07-28T09:50:06.000Z | 2022-03-11T18:50:22.000Z | # TODO: reorg
# simplify code
from ipywidgets import Box, Button, Label, Layout, Tab, ToggleButton
def make_form_item_layout():
# protect nglview if it is not used in notebook (wheen there is not `comm`
return Layout(
display='flex',
flex_flow='row',
justify_content='space-between',
... | 25.691589 | 85 | 0.586031 |
ef271214f7f19bc42401f3bb6b7500744b2fce9c | 2,189 | py | Python | tests/batch_genome_mutator_test.py | martinghunt/simutator | 0218c8a5b37fd72eb4e5b2df4cba9f6118f96788 | [
"MIT"
] | 7 | 2020-01-09T15:25:17.000Z | 2021-08-05T15:58:25.000Z | tests/batch_genome_mutator_test.py | martinghunt/simutator | 0218c8a5b37fd72eb4e5b2df4cba9f6118f96788 | [
"MIT"
] | null | null | null | tests/batch_genome_mutator_test.py | martinghunt/simutator | 0218c8a5b37fd72eb4e5b2df4cba9f6118f96788 | [
"MIT"
] | 1 | 2020-01-09T13:10:02.000Z | 2020-01-09T13:10:02.000Z | import os
import pytest
import shutil
from simutator import batch_genome_mutator
this_dir = os.path.dirname(os.path.abspath(__file__))
data_dir = os.path.join(this_dir, "data", "batch_genome_mutator")
def test_parse_indels_option_string():
with pytest.raises(ValueError):
batch_genome_mutator._parse_inde... | 31.724638 | 86 | 0.613979 |
850cb4348601ea2ae4ce19dc88732a5293c9f715 | 1,409 | py | Python | hututoo/api/manager.py | Shamsherocode/docker-test | 880d61cf645c2ed203e1373c78f0fd9ecf3bdfb7 | [
"MIT"
] | null | null | null | hututoo/api/manager.py | Shamsherocode/docker-test | 880d61cf645c2ed203e1373c78f0fd9ecf3bdfb7 | [
"MIT"
] | null | null | null | hututoo/api/manager.py | Shamsherocode/docker-test | 880d61cf645c2ed203e1373c78f0fd9ecf3bdfb7 | [
"MIT"
] | null | null | null | from django.contrib.auth.base_user import BaseUserManager
class UserManager(BaseUserManager):
use_in_migrations = True
def _create_user(self, email, password, **extra_fields):
"""
Creates and saves a User with the given email and password.
"""
if not email:
raise Va... | 39.138889 | 73 | 0.655075 |
00c5898f0b3cf671347bd9a39e94e98368b76f75 | 610 | py | Python | plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class ShowtickprefixValidator(
_plotly_utils.basevalidators.EnumeratedValidator
):
def __init__(
self,
plotly_name='showtickprefix',
parent_name='scatterpolargl.marker.colorbar',
**kwargs
):
super(ShowtickprefixValidator, self)._... | 27.727273 | 74 | 0.609836 |
fa6415828b2021593ae82a57af05c5ee01a7c0f6 | 985 | py | Python | pypesto/startpoint/latin_hypercube.py | beimbusch/pyPESTO | 8275751eba87efedd6ad1e6923a94d7de0603ddd | [
"BSD-3-Clause"
] | null | null | null | pypesto/startpoint/latin_hypercube.py | beimbusch/pyPESTO | 8275751eba87efedd6ad1e6923a94d7de0603ddd | [
"BSD-3-Clause"
] | null | null | null | pypesto/startpoint/latin_hypercube.py | beimbusch/pyPESTO | 8275751eba87efedd6ad1e6923a94d7de0603ddd | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from .util import rescale
def latin_hypercube(**kwargs) -> np.ndarray:
"""
Generate latin hypercube points.
"""
# extract input
n_starts = kwargs['n_starts']
lb = kwargs['lb']
ub = kwargs['ub']
smooth = kwargs.get('smooth', True)
# parse
dim = lb.size
lb... | 19.313725 | 53 | 0.568528 |
f3bf87d38cdc9056de00fe1f32023c5c7c565e5b | 23,231 | py | Python | src/deployment/deploy.py | tunz/onefuzz | 08d1ea03df852e9468076d76a7f58a4ed51b1555 | [
"MIT"
] | 1 | 2020-09-28T05:02:18.000Z | 2020-09-28T05:02:18.000Z | src/deployment/deploy.py | sandrinejoy/onefuzz | ab41b8986b4d8baa4f2b1f18c1daa57660edb9c0 | [
"MIT"
] | null | null | null | src/deployment/deploy.py | sandrinejoy/onefuzz | ab41b8986b4d8baa4f2b1f18c1daa57660edb9c0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import argparse
import json
import logging
import os
import shutil
import subprocess
import sys
import tempfile
import uuid
import zipfile
from datetime import datetime, timedelta
from data_migration import migrate
from a... | 34.365385 | 130 | 0.591666 |
a9695720a078e5b15a763b061a59c5e992690cba | 4,323 | py | Python | train.py | yashbonde/text2sql | a8202c2bb9c6cd845674492d900c13c07df6c69b | [
"MIT"
] | 11 | 2020-08-07T13:25:43.000Z | 2021-09-16T10:13:15.000Z | train.py | yashbonde/text2sql | a8202c2bb9c6cd845674492d900c13c07df6c69b | [
"MIT"
] | 1 | 2021-01-31T13:13:11.000Z | 2021-09-16T13:32:45.000Z | train.py | yashbonde/text2sql | a8202c2bb9c6cd845674492d900c13c07df6c69b | [
"MIT"
] | 6 | 2020-08-07T05:12:32.000Z | 2021-05-25T12:29:15.000Z | """going by o2f format and using huggingface library
12.11.2020 - @yashbonde"""
import os
from types import SimpleNamespace
from argparse import ArgumentParser
from text2sql.data import T2SDataset, T2SDatasetConfig
from text2sql.model import Text2SQLModel, Text2SQLModelConfig
from text2sql.trainer import *
# --- arg... | 44.112245 | 141 | 0.724034 |
76242ebab72de9145400ca8ddabe53a9e49bd27c | 7,183 | py | Python | cirq-core/cirq/ion/ion_device_test.py | Hosseinberg/Cirq | 8b64834ba601e8b48394753c24800e16b36a59b1 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ion/ion_device_test.py | Hosseinberg/Cirq | 8b64834ba601e8b48394753c24800e16b36a59b1 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ion/ion_device_test.py | Hosseinberg/Cirq | 8b64834ba601e8b48394753c24800e16b36a59b1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq Developers
#
# 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 ... | 32.799087 | 100 | 0.673396 |
7982d2dd66ee3a4bcf2c58a9712f55712b65116e | 366 | py | Python | cafe/migrations/0002_cafe_comment.py | MoGakCo/MogakCo | c0a5c6366179e3e2ad9daeb7cf4c8ca59790ac63 | [
"MIT"
] | 7 | 2018-02-06T07:42:20.000Z | 2019-03-25T03:49:11.000Z | cafe/migrations/0002_cafe_comment.py | MoGakCo/MogakCo | c0a5c6366179e3e2ad9daeb7cf4c8ca59790ac63 | [
"MIT"
] | null | null | null | cafe/migrations/0002_cafe_comment.py | MoGakCo/MogakCo | c0a5c6366179e3e2ad9daeb7cf4c8ca59790ac63 | [
"MIT"
] | 1 | 2018-01-21T12:15:00.000Z | 2018-01-21T12:15:00.000Z | # Generated by Django 2.0.1 on 2018-01-23 07:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cafe', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='cafe',
name='comment',
field=m... | 19.263158 | 47 | 0.571038 |
3c7c7a642644032c1b9fbd8e44ffe8307c869183 | 2,620 | py | Python | behavior_regularized_offline_rl/brac/train_online.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | behavior_regularized_offline_rl/brac/train_online.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | behavior_regularized_offline_rl/brac/train_online.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 32.345679 | 77 | 0.732443 |
02eb6e9d885dfbb12df89a83f2227ef99bcd91ca | 74,252 | py | Python | src/twisted/web/client.py | p12tic/twisted | 9a7ce38d10e28dda92ecf7174856ba59096d6b83 | [
"MIT",
"Unlicense"
] | 32 | 2019-11-14T07:49:33.000Z | 2022-02-16T00:49:22.000Z | src/twisted/web/client.py | p12tic/twisted | 9a7ce38d10e28dda92ecf7174856ba59096d6b83 | [
"MIT",
"Unlicense"
] | 9 | 2019-09-06T18:21:59.000Z | 2022-01-13T03:04:11.000Z | src/twisted/web/client.py | p12tic/twisted | 9a7ce38d10e28dda92ecf7174856ba59096d6b83 | [
"MIT",
"Unlicense"
] | 16 | 2019-06-25T13:26:43.000Z | 2022-03-07T07:29:12.000Z | # -*- test-case-name: twisted.web.test.test_webclient,twisted.web.test.test_agent -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
HTTP client.
"""
from __future__ import division, absolute_import
import os
import warnings
try:
from urlparse import urlunparse, urljoin, urldefrag
e... | 33.044949 | 133 | 0.623242 |
39d353889a989cb88750b3f4ad05159781ab4b63 | 23,992 | py | Python | Coke/ML/createTrainingData_coking_for.py | WesleyLeeNTU/EDC | f28be5ff586f15b21a3cb53814da1039b118f321 | [
"MIT"
] | null | null | null | Coke/ML/createTrainingData_coking_for.py | WesleyLeeNTU/EDC | f28be5ff586f15b21a3cb53814da1039b118f321 | [
"MIT"
] | null | null | null | Coke/ML/createTrainingData_coking_for.py | WesleyLeeNTU/EDC | f28be5ff586f15b21a3cb53814da1039b118f321 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# from EDC.FPC.ML.ML_model_coke import CHCL3
import time
import random
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
import sys
import os
import argparse
from pandas.core.accessor import delegate_names
def EDC_cracking(
reaction_mech,
T_list,
... | 42.091228 | 195 | 0.534887 |
2ea5edf848e99ce58305520b519e37cfb0fb41ef | 1,758 | py | Python | test/unit/module/test_duplicate.py | tomislacker/cfn-python-lint | f209ddfef9bcc1a005adfebcfcc16220b18deddb | [
"MIT-0"
] | 1 | 2020-05-08T20:12:31.000Z | 2020-05-08T20:12:31.000Z | test/unit/module/test_duplicate.py | tomislacker/cfn-python-lint | f209ddfef9bcc1a005adfebcfcc16220b18deddb | [
"MIT-0"
] | null | null | null | test/unit/module/test_duplicate.py | tomislacker/cfn-python-lint | f209ddfef9bcc1a005adfebcfcc16220b18deddb | [
"MIT-0"
] | 1 | 2020-12-01T14:54:28.000Z | 2020-12-01T14:54:28.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import json
from test.testlib.testcase import BaseTestCase
from cfnlint.rules import RulesCollection
from cfnlint.core import DEFAULT_RULESDIR # pylint: disable=E0401
import cfnlint.decode.cfn_yaml # pylint: disa... | 27.046154 | 73 | 0.643345 |
9c4c806f8e107a8d56178e28d6771241e967f8fb | 10,810 | py | Python | aiida/backends/tests/workflows.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/workflows.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/workflows.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 39.025271 | 80 | 0.590842 |
0ba23a714ee1c8ecc34c0ce9a63a9a5bd254e997 | 751 | py | Python | examples/character_death_event_stream.py | spascou/ps2-census | 4edce4b9bfe8af9aca2f28244cb4f70cad67dc93 | [
"MIT"
] | 4 | 2020-05-19T16:20:32.000Z | 2020-10-13T06:09:01.000Z | examples/character_death_event_stream.py | spascou/ps2-census | 4edce4b9bfe8af9aca2f28244cb4f70cad67dc93 | [
"MIT"
] | null | null | null | examples/character_death_event_stream.py | spascou/ps2-census | 4edce4b9bfe8af9aca2f28244cb4f70cad67dc93 | [
"MIT"
] | 1 | 2021-03-08T06:14:53.000Z | 2021-03-08T06:14:53.000Z | ##
#
# This example subscribes the all characters death events on the SolTech server, and
# handles 20 events before exiting.
# Output is in the adjacent NDJSON file.
#
##
from ps2_census import CharacterEvent, EventStream, EventStreamWorld, GenericCharacter
async def main():
stream: EventStream = await Event... | 22.088235 | 86 | 0.691079 |
38ccb337acbbb791b6f15dd216d089343fc46267 | 2,867 | py | Python | FrEIA/framework/reversible_sequential_net.py | psteinb/FrEIA | 24135833171d0c95d817e4cfa2ad268de577ab2b | [
"MIT"
] | null | null | null | FrEIA/framework/reversible_sequential_net.py | psteinb/FrEIA | 24135833171d0c95d817e4cfa2ad268de577ab2b | [
"MIT"
] | null | null | null | FrEIA/framework/reversible_sequential_net.py | psteinb/FrEIA | 24135833171d0c95d817e4cfa2ad268de577ab2b | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
class ReversibleSequential(nn.Module):
'''Simpler than FrEIA.framework.ReversibleGraphNet:
Only supports a sequential series of modules (no splitting, merging, branching off).
Has an append() method, to add new blocks in a more simple way than the computation-graph
ba... | 37.233766 | 109 | 0.622602 |
edb0bd0fe732a2b2fbf0a79bafd3d180f85d3603 | 1,709 | py | Python | gnotty/migrations/0001_initial.py | HankMurphy/gnotty | bea3762dc9cbc3cb21a5ae7224091cf027273c40 | [
"BSD-2-Clause"
] | 59 | 2015-01-10T18:50:58.000Z | 2020-11-27T22:19:57.000Z | gnotty/migrations/0001_initial.py | HankMurphy/gnotty | bea3762dc9cbc3cb21a5ae7224091cf027273c40 | [
"BSD-2-Clause"
] | 3 | 2015-05-26T21:57:58.000Z | 2017-05-01T00:30:32.000Z | gnotty/migrations/0001_initial.py | HankMurphy/gnotty | bea3762dc9cbc3cb21a5ae7224091cf027273c40 | [
"BSD-2-Clause"
] | 22 | 2015-02-10T02:58:32.000Z | 2021-01-13T11:20:43.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'IRCMessage'
db.create_table('gnotty_ircmessage', (
('id', self.gf('django.db.mod... | 42.725 | 117 | 0.600936 |
d2c89d033b806a33dc96257d290d525d7494d7dc | 2,781 | py | Python | src/robot/output/output.py | Lemonlemmings/robotframework | 1acecfdba69b361ae533e5d2920de764c4763839 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-10-23T09:43:53.000Z | 2020-10-23T09:43:53.000Z | src/robot/output/output.py | Lemonlemmings/robotframework | 1acecfdba69b361ae533e5d2920de764c4763839 | [
"ECL-2.0",
"Apache-2.0"
] | 22 | 2021-03-10T07:29:37.000Z | 2022-02-28T04:11:06.000Z | src/robot/output/output.py | Lemonlemmings/robotframework | 1acecfdba69b361ae533e5d2920de764c4763839 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 35.202532 | 94 | 0.720245 |
612080b336e337bef9b902285565db59b8d05c6e | 30,911 | py | Python | test/functional/test_framework/p2p.py | robbelouwet/Elixir | 609412402c5dd4fb9d77ae6d87505d8efd608132 | [
"MIT"
] | null | null | null | test/functional/test_framework/p2p.py | robbelouwet/Elixir | 609412402c5dd4fb9d77ae6d87505d8efd608132 | [
"MIT"
] | null | null | null | test/functional/test_framework/p2p.py | robbelouwet/Elixir | 609412402c5dd4fb9d77ae6d87505d8efd608132 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2020 The Elixir Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test objects ... | 39.078382 | 190 | 0.649866 |
f5dd6170892bc2fa85463e70697baf5f29d9d022 | 2,179 | py | Python | stardog/http/client.py | drahnreb/pystardog | 4ed4f42bc90b9713316601d329939dfe3993f3a7 | [
"Apache-2.0"
] | null | null | null | stardog/http/client.py | drahnreb/pystardog | 4ed4f42bc90b9713316601d329939dfe3993f3a7 | [
"Apache-2.0"
] | null | null | null | stardog/http/client.py | drahnreb/pystardog | 4ed4f42bc90b9713316601d329939dfe3993f3a7 | [
"Apache-2.0"
] | null | null | null | import requests
import requests.auth
import requests_toolbelt.multipart as multipart
from .. import exceptions as exceptions
class Client(object):
DEFAULT_ENDPOINT = 'http://localhost:5820'
DEFAULT_USERNAME = 'admin'
DEFAULT_PASSWORD = 'admin'
def __init__(self,
endpoint=None,
... | 33.523077 | 110 | 0.61129 |
f4f7d41d4a4bda02ed3634ed04a864a895b0af6c | 4,728 | py | Python | acidrain.py | alaxa27/competitive | f60f1470ba12e83e483127c109d1f60f22b88130 | [
"Apache-2.0"
] | null | null | null | acidrain.py | alaxa27/competitive | f60f1470ba12e83e483127c109d1f60f22b88130 | [
"Apache-2.0"
] | null | null | null | acidrain.py | alaxa27/competitive | f60f1470ba12e83e483127c109d1f60f22b88130 | [
"Apache-2.0"
] | null | null | null | class AcidRain():
def create_map(self, b, e, y):
size = max(e) - min(b)
self.MAP = []
for i in range(0, len(self.L)):
self.MAP.append((size+2)*[-1])
"""
for i in range(0, len(self.L)):
for j in range(b[i], e[i]+1):
self.MAP[i][j] = i
... | 31.311258 | 71 | 0.389594 |
ce9ccb15174eea8d282d708db59a123cda7fb1e9 | 141,792 | py | Python | researchon_backgroundcontrolling routerpsloit.py | tanc7/ArmsCommander-TestBed | e00bb166084735d8b0de058b54d6d98a057cd7d8 | [
"FSFUL"
] | 1 | 2018-10-17T04:49:42.000Z | 2018-10-17T04:49:42.000Z | researchon_backgroundcontrolling routerpsloit.py | tanc7/ArmsCommander-TestBed | e00bb166084735d8b0de058b54d6d98a057cd7d8 | [
"FSFUL"
] | null | null | null | researchon_backgroundcontrolling routerpsloit.py | tanc7/ArmsCommander-TestBed | e00bb166084735d8b0de058b54d6d98a057cd7d8 | [
"FSFUL"
] | null | null | null | """
if not os.path.exists(self.history_file):
open(self.history_file, 'a+').close()
readline.read_history_file(self.history_file)
readline.set_history_length(self.history_length)
atexit.register(readline.write_history_file, self.history_file)
readline.parse_and_bind('set enable-keypad on')
readline.set_completer... | 69.099415 | 7,433 | 0.711768 |
e600e887120db9d6a51c6995bc84313eb0c0402b | 738 | py | Python | Problems/String/0344-ReverseString.py | s2503901ernie/LeetCode | cd40be2ddd2bc5e4e5630ec9068ae62504d527c2 | [
"MIT"
] | null | null | null | Problems/String/0344-ReverseString.py | s2503901ernie/LeetCode | cd40be2ddd2bc5e4e5630ec9068ae62504d527c2 | [
"MIT"
] | null | null | null | Problems/String/0344-ReverseString.py | s2503901ernie/LeetCode | cd40be2ddd2bc5e4e5630ec9068ae62504d527c2 | [
"MIT"
] | null | null | null | """
Write a function that reverses a string. The input string is given as an array of characters s.
You must do this by modifying the input array in-place with O(1) extra memory.
Example 1:
Input: s = ["h","e","l","l","o"]
Output: ["o","l","l","e","h"]
Example 2:
Input: s = ["H","a","n","n","a","h"]
Output: ["h"... | 21.085714 | 95 | 0.536585 |
ebe310fd4754bc7cd50064131e016ff83c3265ce | 3,820 | py | Python | skdesign/power/gof/cmh.py | louden/scikit-design | c51259fd7de43d6bdb4bb49e71136321768c2acc | [
"BSD-3-Clause"
] | 2 | 2016-10-31T04:22:50.000Z | 2019-08-19T10:58:24.000Z | skdesign/power/gof/cmh.py | louden/scikit-design | c51259fd7de43d6bdb4bb49e71136321768c2acc | [
"BSD-3-Clause"
] | null | null | null | skdesign/power/gof/cmh.py | louden/scikit-design | c51259fd7de43d6bdb4bb49e71136321768c2acc | [
"BSD-3-Clause"
] | 2 | 2018-06-06T10:58:15.000Z | 2020-08-10T10:57:49.000Z | from skdesign.power.gof import GofBase
from skdesign.power import (is_in_0_1,
is_integer)
import math
import scipy.stats as stats
class CMH(GofBase):
""" Cochran-Mantel-Haenszel Test for Independance (Multiple Strata)
Cochran-Mantel-Haenszel Independance Test uses a Chi Squared te... | 33.80531 | 77 | 0.551832 |
a37cfd876e6095ce928e64cf8b84d2107d3a1b40 | 3,963 | py | Python | fluent_comments/forms/helper.py | susansan/django-fluent-comments | 74c2d682cc30a03695667d92a1caa74532b7af59 | [
"Apache-2.0"
] | null | null | null | fluent_comments/forms/helper.py | susansan/django-fluent-comments | 74c2d682cc30a03695667d92a1caa74532b7af59 | [
"Apache-2.0"
] | null | null | null | fluent_comments/forms/helper.py | susansan/django-fluent-comments | 74c2d682cc30a03695667d92a1caa74532b7af59 | [
"Apache-2.0"
] | 1 | 2019-07-07T23:53:43.000Z | 2019-07-07T23:53:43.000Z | from crispy_forms.helper import FormHelper
from crispy_forms.layout import Button, Submit
from crispy_forms.utils import TEMPLATE_PACK
from django import forms
from django.forms.widgets import Input
from django.utils.translation import ugettext_lazy as _
from django_comments import get_form_target
from fluent_comments... | 36.694444 | 116 | 0.680545 |
77ca0c62cbc24b9185a0ada2b84f173e2552be32 | 14,339 | py | Python | jax/experimental/stax.py | JaeHunRo/jax | 3898033e953297af8483ab5ef2e38f7651abc0d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/experimental/stax.py | JaeHunRo/jax | 3898033e953297af8483ab5ef2e38f7651abc0d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/experimental/stax.py | JaeHunRo/jax | 3898033e953297af8483ab5ef2e38f7651abc0d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing, ... | 37.933862 | 93 | 0.688123 |
65e9987db1356a3edb16d14e1e8b7ab614729859 | 1,120 | py | Python | PythonExercicios/ex059.py | Luis-Emanuel/Python | 92936dfb005b9755a53425d16c3ff54119eebe78 | [
"MIT"
] | null | null | null | PythonExercicios/ex059.py | Luis-Emanuel/Python | 92936dfb005b9755a53425d16c3ff54119eebe78 | [
"MIT"
] | null | null | null | PythonExercicios/ex059.py | Luis-Emanuel/Python | 92936dfb005b9755a53425d16c3ff54119eebe78 | [
"MIT"
] | null | null | null | #Crie um programa que leia dois valores e mostre um menu. Seu programa deverá realizar a operação solicitada em cada caso.
#[1] soma [2] multiplicar [3] maior [4] novos números [5] sair do programa.
num1 = int(input('Digite um número: '))
num2 = int(input('Digite outro número: '))
esc = 0
while esc != 5:
print('''-... | 38.62069 | 122 | 0.534821 |
2d03fda39dec260f73b7dda63802a96d359722dc | 51,662 | py | Python | testing/test_collection.py | graingert/pytest | 89dcfbf293802b6efacc5aea2893f9fec03787bc | [
"MIT"
] | null | null | null | testing/test_collection.py | graingert/pytest | 89dcfbf293802b6efacc5aea2893f9fec03787bc | [
"MIT"
] | 60 | 2020-12-07T03:10:15.000Z | 2022-03-28T03:02:29.000Z | testing/test_collection.py | graingert/pytest | 89dcfbf293802b6efacc5aea2893f9fec03787bc | [
"MIT"
] | 1 | 2020-12-09T02:24:06.000Z | 2020-12-09T02:24:06.000Z | import os
import pprint
import shutil
import sys
import textwrap
from pathlib import Path
from typing import List
import py.path
import pytest
from _pytest.config import ExitCode
from _pytest.fixtures import FixtureRequest
from _pytest.main import _in_venv
from _pytest.main import Session
from _pytest.monkeypatch imp... | 35.240109 | 103 | 0.587647 |
58939687baa699d22e9db901f107d26f9c724a04 | 5,923 | py | Python | lazydata/storage/local.py | zbitouzakaria/lazydata | a568142a5878d5cf42165e0e8a420d8f738af846 | [
"Apache-2.0"
] | null | null | null | lazydata/storage/local.py | zbitouzakaria/lazydata | a568142a5878d5cf42165e0e8a420d8f738af846 | [
"Apache-2.0"
] | null | null | null | lazydata/storage/local.py | zbitouzakaria/lazydata | a568142a5878d5cf42165e0e8a420d8f738af846 | [
"Apache-2.0"
] | null | null | null | """
An abstraction layer for the local cache
"""
from pathlib import Path, PurePosixPath
import yaml
import os
import stat
from peewee import SqliteDatabase, Model, CharField, IntegerField
from lazydata.storage.hash import calculate_file_sha256
import shutil
BASE_PATH = Path(Path.home().resolve(), ".lazydata")
MET... | 29.034314 | 102 | 0.598008 |
ae93416d4c7a94038b1eac4518705560e5460f5f | 89 | py | Python | coding/coin_change/starter.py | alexanderywang/tech-interview-questions | a0098eda33db73d10787e198d1f105532ea32c09 | [
"MIT"
] | null | null | null | coding/coin_change/starter.py | alexanderywang/tech-interview-questions | a0098eda33db73d10787e198d1f105532ea32c09 | [
"MIT"
] | null | null | null | coding/coin_change/starter.py | alexanderywang/tech-interview-questions | a0098eda33db73d10787e198d1f105532ea32c09 | [
"MIT"
] | null | null | null | class Solution:
def coinChange(self, coins: List[int], amount: int) -> int:
| 22.25 | 63 | 0.606742 |
819ae0fb90247aa85be043fe2b3fb0f6c5789713 | 1,873 | py | Python | setup.py | coleifer/unqlite-python | b0d121b20a0c11e23e65eca559eade711de3b671 | [
"MIT"
] | 324 | 2015-02-08T12:11:39.000Z | 2022-03-30T18:43:15.000Z | setup.py | coleifer/unqlite-python | b0d121b20a0c11e23e65eca559eade711de3b671 | [
"MIT"
] | 54 | 2015-02-09T16:07:08.000Z | 2022-02-10T14:54:53.000Z | setup.py | coleifer/unqlite-python | b0d121b20a0c11e23e65eca559eade711de3b671 | [
"MIT"
] | 37 | 2015-02-08T10:50:11.000Z | 2021-12-01T13:55:26.000Z | import glob
import warnings
from setuptools import setup
from setuptools.extension import Extension
try:
from Cython.Build import cythonize
except ImportError:
cython_installed = False
warnings.warn('Cython not installed, using pre-generated C source file.')
else:
cython_installed = True
if cython_in... | 32.293103 | 80 | 0.64976 |
65e6626b2df5419e54f9ca25265508c3961541ad | 2,093 | py | Python | backend/api/pdfreader.py | asa008/nhyai | d97f8a4d18e315dcbd1159c2ed03611adb76ba70 | [
"Apache-2.0"
] | 3 | 2021-02-12T11:49:50.000Z | 2022-03-07T02:05:54.000Z | backend/api/pdfreader.py | ettingshausen/nhyai | 33be2078cf2835d85fedc901d343568e79a5941f | [
"Apache-2.0"
] | null | null | null | backend/api/pdfreader.py | ettingshausen/nhyai | 33be2078cf2835d85fedc901d343568e79a5941f | [
"Apache-2.0"
] | 3 | 2020-04-24T05:39:30.000Z | 2021-08-16T03:23:29.000Z | from pdfminer.layout import LTTextBoxHorizontal, LAParams
from pdfminer.pdfparser import PDFParser, PDFDocument
from pdfminer.pdfinterp import PDFTextExtractionNotAllowed
from pdfminer.converter import PDFPageAggregator
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
import os.path
import pyocr
im... | 34.883333 | 74 | 0.616818 |
17bdd4616927c288e3d484d2239de7b828d67fbb | 19,187 | py | Python | pywikibot/userinterfaces/terminal_interface_base.py | valhallasw/pywikibot-core | 32a8c3c1298a5cb077381fe202daefde82c1c5d3 | [
"MIT"
] | null | null | null | pywikibot/userinterfaces/terminal_interface_base.py | valhallasw/pywikibot-core | 32a8c3c1298a5cb077381fe202daefde82c1c5d3 | [
"MIT"
] | null | null | null | pywikibot/userinterfaces/terminal_interface_base.py | valhallasw/pywikibot-core | 32a8c3c1298a5cb077381fe202daefde82c1c5d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Base for terminal user interfaces."""
#
# (C) Pywikibot team, 2003-2015
#
# Distributed under the terms of the MIT license.
#
from __future__ import unicode_literals
__version__ = '$Id: 17bdd4616927c288e3d484d2239de7b828d67fbb $'
import getpass
import logging
import math
import re
import sy... | 36.686424 | 95 | 0.588315 |
c626d18ce2889c81d1635a8f0495d8e47f653401 | 5,204 | py | Python | doc/oop/oop.py | rasql/edunum | c9e3be3dbf86a6eb6c28d46b055f8a72bff00ee5 | [
"MIT"
] | 3 | 2021-02-15T22:30:03.000Z | 2021-06-16T13:28:25.000Z | doc/oop/oop.py | rasql/edunum | c9e3be3dbf86a6eb6c28d46b055f8a72bff00ee5 | [
"MIT"
] | null | null | null | doc/oop/oop.py | rasql/edunum | c9e3be3dbf86a6eb6c28d46b055f8a72bff00ee5 | [
"MIT"
] | 3 | 2021-02-15T10:37:12.000Z | 2021-08-10T13:25:42.000Z | import pyglet, sys, random, math
# Create a bouncing ball window
# for k, v in pyglet.options.items():
# print(k, '=', v)
# press C to add circles
# press R to add rectangles
class Vec2:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return f'Vec2({sel... | 29.235955 | 87 | 0.538816 |
33e1d17e9a1683db427e7a9f0f65a7e519a3d29c | 2,109 | py | Python | main.py | adamwigg/mlp | 69d48a7705d6d93b6b5348311e98a2f81af07214 | [
"MIT"
] | null | null | null | main.py | adamwigg/mlp | 69d48a7705d6d93b6b5348311e98a2f81af07214 | [
"MIT"
] | null | null | null | main.py | adamwigg/mlp | 69d48a7705d6d93b6b5348311e98a2f81af07214 | [
"MIT"
] | null | null | null | """
Simple ANN (ann.py) Experiment setup and execution
Adam Wigg @ University of Canberra for Soft Computing S2/2021
"""
import ann
def main():
config = { # All new experiment variables
# Data
"data_file": "data/iris_str.csv", # Relative filepath to csv file
"data_seperator": ",", # Usua... | 32.953125 | 101 | 0.63395 |
e5d63f45b34eb290e1da5d11c6fe41cf3b4592dc | 636 | py | Python | HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltPhase2L3MuonHighPtTripletStepChi2Est_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltPhase2L3MuonHighPtTripletStepChi2Est_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltPhase2L3MuonHighPtTripletStepChi2Est_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:16:05.000Z | 2021-11-30T16:16:05.000Z | import FWCore.ParameterSet.Config as cms
hltPhase2L3MuonHighPtTripletStepChi2Est = cms.ESProducer("Chi2ChargeMeasurementEstimatorESProducer",
ComponentName = cms.string('hltPhase2L3MuonHighPtTripletStepChi2Est'),
MaxChi2 = cms.double(16.0),
MaxDisplacement = cms.double(0.5),
MaxSagitta = cms.double(2),... | 37.411765 | 100 | 0.735849 |
906bbb945cefda3270acfb20d15731894f64c843 | 14,577 | py | Python | py36/lib/python3.6/site-packages/pyhandle/clientcredentials.py | soulflysof/Dockerfiles | 0158c015a97873cff3181b2a9ebfa6753aaf3110 | [
"Apache-2.0"
] | null | null | null | py36/lib/python3.6/site-packages/pyhandle/clientcredentials.py | soulflysof/Dockerfiles | 0158c015a97873cff3181b2a9ebfa6753aaf3110 | [
"Apache-2.0"
] | null | null | null | py36/lib/python3.6/site-packages/pyhandle/clientcredentials.py | soulflysof/Dockerfiles | 0158c015a97873cff3181b2a9ebfa6753aaf3110 | [
"Apache-2.0"
] | 1 | 2020-11-04T04:23:50.000Z | 2020-11-04T04:23:50.000Z | '''
This module provides the class PIDClientCredentials
which handles the credentials for Handle server
Interaction and for the Search Servlet.
Author: Merret Buurman (DKRZ), 2015-2016
'''
import json
import os
import logging
import pyhandle
from pyhandle.handleexceptions import CredentialsFormatError, HandleSyntaxE... | 38.159686 | 113 | 0.643136 |
932c23be2f0d7b759503325acadc00febaf79c4b | 2,751 | py | Python | cupcake/editor/minimap.py | billyeatcookies/cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | 3 | 2022-03-29T12:55:24.000Z | 2022-03-30T17:06:11.000Z | cupcake/editor/minimap.py | billyeatcookies/Cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | null | null | null | cupcake/editor/minimap.py | billyeatcookies/Cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | null | null | null | import tkinter as tk
class Minimap(tk.Frame):
def __init__(self, master, textw, *args, **kwargs):
super().__init__(master, *args, **kwargs)
self.master = master
self.tw = textw
self.font = ("Arial", 1, "bold")
self.config(bg="#252526", highlightthickness=0)
... | 37.175676 | 110 | 0.628135 |
301066464efb67b7028096275dfd3571b7c43add | 59 | py | Python | run.py | jpjenk/data_archiver | 2e1658c1def0f4cb312f4ddc52fbd2c5e13f567d | [
"MIT"
] | 3 | 2019-01-24T10:36:44.000Z | 2019-09-30T17:39:40.000Z | run.py | jpjenk/data_archiver | 2e1658c1def0f4cb312f4ddc52fbd2c5e13f567d | [
"MIT"
] | 5 | 2019-02-15T01:32:05.000Z | 2019-08-01T15:54:31.000Z | run.py | jpjenk/data_archiver | 2e1658c1def0f4cb312f4ddc52fbd2c5e13f567d | [
"MIT"
] | null | null | null | FLASK_APP=archiver.py flask run --host=0.0.0.0 --port=3080
| 29.5 | 58 | 0.728814 |
64b421255f6cf24e6cf3fc5a792a2a37da9946a2 | 2,596 | py | Python | backend/utils/utils.py | napari-hub-bot/napari-hub | 626b53a82e62bd00dab6f9ab0529441da6506c19 | [
"MIT"
] | null | null | null | backend/utils/utils.py | napari-hub-bot/napari-hub | 626b53a82e62bd00dab6f9ab0529441da6506c19 | [
"MIT"
] | null | null | null | backend/utils/utils.py | napari-hub-bot/napari-hub | 626b53a82e62bd00dab6f9ab0529441da6506c19 | [
"MIT"
] | null | null | null | import os
from typing import List
import requests
from bs4 import BeautifulSoup
from markdown import markdown
from requests import HTTPError
# Environment variable set through ecs stack terraform module
slack_url = os.environ.get('SLACK_URL')
def get_attribute(obj: dict, path: list):
"""
Get attribute itera... | 30.541176 | 105 | 0.676425 |
b211871e89556734410f0a05062bdd2a111a87b9 | 8,134 | py | Python | data/example_graphs.py | EddieCunningham/CausalInference | 5938787a41222ae1810d5c649a1f3b93285fbb1e | [
"MIT"
] | 1 | 2020-04-21T08:44:05.000Z | 2020-04-21T08:44:05.000Z | data/example_graphs.py | hebo910820/CausalInference | 5938787a41222ae1810d5c649a1f3b93285fbb1e | [
"MIT"
] | null | null | null | data/example_graphs.py | hebo910820/CausalInference | 5938787a41222ae1810d5c649a1f3b93285fbb1e | [
"MIT"
] | 1 | 2019-09-17T02:34:31.000Z | 2019-09-17T02:34:31.000Z | from host.src.graph import Graph
def polyTree1():
graph = Graph()
graph.addEdge( parents=[ 0, 1 ], children=[ 2 ] )
return graph
def polyTree2():
graph = Graph()
graph.addEdge( parents=[ 0, 1 ], children=[ 4 ] )
graph.addEdge( parents=[ 2, 3 ], children=[ 5 ] )
graph.addEdge( parents=[ 4... | 26.668852 | 69 | 0.549914 |
4a0a0df4944e8651a6c47f8c62dee081bb1a8126 | 2,241 | py | Python | sphinx/util/docstrings.py | merwok-forks/sphinx | b7cada236f765003a73ab5dca48f975d54c0c298 | [
"BSD-2-Clause"
] | null | null | null | sphinx/util/docstrings.py | merwok-forks/sphinx | b7cada236f765003a73ab5dca48f975d54c0c298 | [
"BSD-2-Clause"
] | null | null | null | sphinx/util/docstrings.py | merwok-forks/sphinx | b7cada236f765003a73ab5dca48f975d54c0c298 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx.util.docstrings
~~~~~~~~~~~~~~~~~~~~~~
Utilities for docstring processing.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
if False:
# For type annotation
from typing import List #... | 32.014286 | 80 | 0.616243 |
5dde9b3a41f51150e289a2d0c701421346b1c8fc | 6,704 | py | Python | mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/events/custom_resource_definition.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/events/custom_resource_definition.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/events/custom_resource_definition.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 31.92381 | 78 | 0.70898 |
6600c6344c7dc3404bffcae114afe1b89366eb66 | 13,370 | py | Python | lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | 605 | 2019-10-18T01:15:54.000Z | 2022-03-31T14:31:04.000Z | lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | 3,180 | 2019-10-18T01:21:21.000Z | 2022-03-31T23:25:41.000Z | lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | 275 | 2019-10-18T05:27:22.000Z | 2022-03-30T09:04:21.000Z | """Test that corefiles with LC_NOTE "kern ver str" and "main bin spec" load commands works."""
import os
import re
import subprocess
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestFirmwareCorefiles(TestBase):
mydir = Tes... | 47.243816 | 151 | 0.629544 |
c171847962c478a252d2f285cf57985ee823997e | 1,440 | py | Python | var/spack/repos/builtin/packages/py-natsort/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/py-natsort/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/py-natsort/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyNatsort(PythonPackage):
"""Simple yet flexible natural sorting in Python."""
homepa... | 53.333333 | 95 | 0.797222 |
d896e777ff4787d88f30a8c7b76ca7c954707c52 | 9,026 | py | Python | docs/conf.py | edwardlo12/geojs-0.15.0 | 8bac0371515c7a2e5cf1f4af0923c7f9d8d567a5 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | edwardlo12/geojs-0.15.0 | 8bac0371515c7a2e5cf1f4af0923c7f9d8d567a5 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | edwardlo12/geojs-0.15.0 | 8bac0371515c7a2e5cf1f4af0923c7f9d8d567a5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# geojs documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 27 13:44:49 2014.
#
# 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.
#
# All... | 31.449477 | 79 | 0.710281 |
11208e4a57347b8cb5d657d84e11d8e1584c5fc8 | 3,046 | py | Python | tx2/utils.py | ORNL/tx2 | c2365580a994d35b31ec5a4c1be5acb3a4a7c8d7 | [
"BSD-3-Clause"
] | 16 | 2021-01-29T19:28:50.000Z | 2022-02-08T16:12:48.000Z | tx2/utils.py | ORNL/tx2 | c2365580a994d35b31ec5a4c1be5acb3a4a7c8d7 | [
"BSD-3-Clause"
] | 6 | 2021-11-05T13:42:07.000Z | 2021-12-18T20:50:31.000Z | tx2/utils.py | ORNL/tx2 | c2365580a994d35b31ec5a4c1be5acb3a4a7c8d7 | [
"BSD-3-Clause"
] | 2 | 2020-12-13T02:39:21.000Z | 2021-02-08T15:27:33.000Z | import asyncio
import numpy as np
from threading import Timer
from torch import cuda
DISABLE_DEBOUNCE = False
"""The main embedding plot is debounced to prevent excessive calling while editing text. Note that exceptions don't propagate due to threading when this occurs. Set this global to True to receive exceptions."... | 26.034188 | 210 | 0.622127 |
c918f629bc07e8881adf3ebd588ccec66a742ea4 | 4,328 | py | Python | zerver/management/commands/soft_deactivate_users.py | shefali163/zulip | 015af605cfb28b417b557ed9278835fd267bcfd8 | [
"Apache-2.0"
] | 3 | 2018-12-04T01:44:43.000Z | 2019-05-13T06:16:21.000Z | zerver/management/commands/soft_deactivate_users.py | alex784004/patient | a6510c4626392b9a8385cbac82698d9e23df0a55 | [
"Apache-2.0"
] | 58 | 2018-11-27T15:18:54.000Z | 2018-12-09T13:43:07.000Z | zerver/management/commands/soft_deactivate_users.py | alex784004/patient | a6510c4626392b9a8385cbac82698d9e23df0a55 | [
"Apache-2.0"
] | 9 | 2019-11-04T18:59:29.000Z | 2022-03-22T17:46:37.000Z |
import sys
from argparse import ArgumentParser
from typing import Any, Dict, List
from django.conf import settings
from zerver.lib.management import ZulipBaseCommand
from zerver.lib.soft_deactivation import do_soft_activate_users, \
do_soft_deactivate_users, get_users_for_soft_deactivation, logger
from zerver.mo... | 44.618557 | 99 | 0.554067 |
3bbaa82286a1d19a91488d26a2bb38d2cb872663 | 3,116 | py | Python | docs/sphinx/source/conf.py | bernardopacini/f90wrapTemplate | 801d3ab0a4394a5256f419dbae67457a110f1fb1 | [
"MIT"
] | 3 | 2022-02-10T20:54:27.000Z | 2022-02-13T22:40:21.000Z | docs/sphinx/source/conf.py | bernardopacini/f90wrapTemplate | 801d3ab0a4394a5256f419dbae67457a110f1fb1 | [
"MIT"
] | null | null | null | docs/sphinx/source/conf.py | bernardopacini/f90wrapTemplate | 801d3ab0a4394a5256f419dbae67457a110f1fb1 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.505376 | 79 | 0.669769 |
269a258ae539dfdebb98e7507515d7eb29e1ebaa | 1,244 | py | Python | scripts/ai.py | jstnhuang/chatbot | 331f5f847f027905cf5c22b66d731d151e282a51 | [
"MIT"
] | 16 | 2015-05-01T04:37:17.000Z | 2021-04-16T05:26:23.000Z | scripts/ai.py | jstnhuang/chatbot | 331f5f847f027905cf5c22b66d731d151e282a51 | [
"MIT"
] | 1 | 2016-09-06T04:35:39.000Z | 2019-09-16T11:01:16.000Z | scripts/ai.py | jstnhuang/chatbot | 331f5f847f027905cf5c22b66d731d151e282a51 | [
"MIT"
] | 16 | 2015-05-01T04:37:17.000Z | 2020-12-01T14:29:49.000Z | #!/usr/bin/env python
import aiml
import rospy
import os
import sys
from chatbot.msg import ChatMessage
from std_msgs.msg import String
class Chatbot():
def __init__(self):
self._kernel = aiml.Kernel()
rospy.init_node('chatbot_ai')
rospy.Subscriber('chatbot_speech', ChatMessage, self._request_callback)... | 25.387755 | 75 | 0.685691 |
0cde288694905dadb83458256a681e9a26cd9df7 | 36,246 | py | Python | code/tmp_rtrip/nntplib.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | 24 | 2018-01-23T05:28:40.000Z | 2021-04-13T20:52:59.000Z | code/tmp_rtrip/nntplib.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | 17 | 2017-12-21T18:32:31.000Z | 2018-12-18T17:09:50.000Z | code/tmp_rtrip/nntplib.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | null | null | null | """An NNTP client class based on:
- RFC 977: Network News Transfer Protocol
- RFC 2980: Common NNTP Extensions
- RFC 3977: Network News Transfer Protocol (version 2)
Example:
>>> from nntplib import NNTP
>>> s = NNTP('news')
>>> resp, count, first, last, name = s.group('comp.lang.python')
>>> print('Group', name, 'ha... | 36.20979 | 89 | 0.580202 |
ffd3bb3142b701d1f87d00f53e8f9c8db0315401 | 4,383 | py | Python | src/urequests.py | ITJoker233/Esp32-Cam_IP_Camera | 6bf1e6002393ee18b581aef4e41a3af4be13fb9d | [
"MIT"
] | 16 | 2020-07-22T12:24:47.000Z | 2022-01-17T06:28:02.000Z | src/urequests.py | ITJoker233/Esp32-Cam_IP_Camera | 6bf1e6002393ee18b581aef4e41a3af4be13fb9d | [
"MIT"
] | 1 | 2020-07-22T17:18:52.000Z | 2021-07-04T13:24:54.000Z | src/urequests.py | ITJoker233/Esp32-Cam_IP_Camera | 6bf1e6002393ee18b581aef4e41a3af4be13fb9d | [
"MIT"
] | 1 | 2021-04-01T07:30:03.000Z | 2021-04-01T07:30:03.000Z | import usocket
class Response:
def __init__(self, f):
self.raw = f
self.encoding = 'utf-8'
self._cached = None
def close(self):
if self.raw:
self.raw.close()
self.raw = None
self._cached = None
@property
def content(self... | 28.647059 | 93 | 0.439197 |
252225c885c84dce956344afcdef31841ad34390 | 8,068 | py | Python | python_on_whales/client_config.py | haruishi43/python-on-whales | e26c3e4367428588bad0b028c7258124a111c0c6 | [
"MIT"
] | null | null | null | python_on_whales/client_config.py | haruishi43/python-on-whales | e26c3e4367428588bad0b028c7258124a111c0c6 | [
"MIT"
] | null | null | null | python_on_whales/client_config.py | haruishi43/python-on-whales | e26c3e4367428588bad0b028c7258124a111c0c6 | [
"MIT"
] | null | null | null | import json
import shutil
import tempfile
import warnings
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from typing import Any, Dict, List, Optional
import pydantic
from python_on_whales.download_binaries import DOCKER_BINARY_PATH, download_docker_cli
from python_on_whales.utils im... | 34.042194 | 90 | 0.633118 |
7b2524acc07989ab18bea077c2af286720e61494 | 6,688 | py | Python | djmodels/core/signing.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 5 | 2019-02-15T16:47:50.000Z | 2021-12-26T18:52:23.000Z | djmodels/core/signing.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | null | null | null | djmodels/core/signing.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 2 | 2021-08-09T02:29:09.000Z | 2021-08-20T03:30:11.000Z | """
Functions for creating and restoring url-safe signed JSON objects.
The format used looks like this:
>>> signing.dumps("hello")
'ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk'
There are two components here, separated by a ':'. The first component is a
URLsafe base64 encoded JSON of the object passed to dumps(). T... | 33.60804 | 98 | 0.685257 |
4af42df910fe9bf3722e44764f5d3c010301fe05 | 1,382 | py | Python | Validation/GlobalDigis/python/globaldigis_analyze_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Validation/GlobalDigis/python/globaldigis_analyze_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Validation/GlobalDigis/python/globaldigis_analyze_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
globaldigisanalyze = cms.EDAnalyzer("GlobalDigisAnalyzer",
hitsProducer = cms.string('g4SimHits'),
MuCSCStripSrc = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigi"),
MuDTSrc = cms.InputTag("simMuonDTDigis"),
Name = cms.untracked.string('GlobalDigisAnalyzer'),
... | 39.485714 | 71 | 0.708394 |
da6c1fa992fbb6ace516d7717b624b790e447c1a | 233 | py | Python | oop/tdd/tictactoe/tictactoe.py | mikar/60-days-of-python | 1b65ed978e908f3ae357c91abeb2a36564b13316 | [
"MIT"
] | 10 | 2016-07-31T13:38:09.000Z | 2021-07-21T16:52:26.000Z | oop/tdd/tictactoe/tictactoe.py | oguzhalit/60-days-of-python | 1b65ed978e908f3ae357c91abeb2a36564b13316 | [
"MIT"
] | null | null | null | oop/tdd/tictactoe/tictactoe.py | oguzhalit/60-days-of-python | 1b65ed978e908f3ae357c91abeb2a36564b13316 | [
"MIT"
] | 9 | 2017-07-31T14:41:38.000Z | 2021-07-21T16:52:26.000Z | class Board(object):
def __init__(self):
self.pawns = {0: "X", 1: "O"}
self.player = self.pawns[0]
self.npc = self.pawns[1]
if __name__ == "__main__":
b = Board()
print b.pawns, b.player, b.npc
| 19.416667 | 37 | 0.545064 |
d3797b77d9f2a01a058311abd0cd3b9ef9475c13 | 2,751 | py | Python | commands/default_cmdsets.py | Miami-Blood-in-the-Water/miami-new | d57a741e30423c676d5044b25d939d7553d8959b | [
"MIT"
] | null | null | null | commands/default_cmdsets.py | Miami-Blood-in-the-Water/miami-new | d57a741e30423c676d5044b25d939d7553d8959b | [
"MIT"
] | null | null | null | commands/default_cmdsets.py | Miami-Blood-in-the-Water/miami-new | d57a741e30423c676d5044b25d939d7553d8959b | [
"MIT"
] | null | null | null | """
Command sets
All commands in the game must be grouped in a cmdset. A given command
can be part of any number of cmdsets and cmdsets can be added/removed
and merged onto entities at runtime.
To create new commands to populate the cmdset, see
`commands/command.py`.
This module wraps the default command sets of Ev... | 27.237624 | 72 | 0.666667 |
d536e509ac8cd1c52b4a4f12ab409a4357b5eb1f | 8,640 | py | Python | lib/JumpScale/baselib/codetools/WordReplacer.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | 1 | 2015-10-26T10:38:13.000Z | 2015-10-26T10:38:13.000Z | lib/JumpScale/baselib/codetools/WordReplacer.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | null | null | null | lib/JumpScale/baselib/codetools/WordReplacer.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | null | null | null |
from JumpScale import j
import re,random
class Synonym():
def __init__(self,name='',replaceWith='', simpleSearch="", addConfluenceLinkTags=False, replaceExclude=''):
"""
@param name: Name of the sysnoym
@param replaceWith: The replacement of simpleSearch
@param simpleSearch: Searc... | 43.2 | 261 | 0.596875 |
b69f1b490dc76ed94c5d19e5f001839cff1e04a6 | 3,385 | py | Python | App/tests.py | steve-njuguna-k/Django-Gallery | 4970a265ea67340f2c49723a373db4b0f04f2240 | [
"MIT"
] | 1 | 2022-02-01T17:52:23.000Z | 2022-02-01T17:52:23.000Z | App/tests.py | steve-njuguna-k/Django-Gallery | 4970a265ea67340f2c49723a373db4b0f04f2240 | [
"MIT"
] | null | null | null | App/tests.py | steve-njuguna-k/Django-Gallery | 4970a265ea67340f2c49723a373db4b0f04f2240 | [
"MIT"
] | null | null | null | from django.test import TestCase
from .models import Image, Category, Location
from django.contrib.auth.models import User
user = User.objects.get(id=1)
# Create your tests here.
class LocationTestCLass(TestCase):
#Set up Method
def setUp(self):
self.loc = Location(name="Kenya")
self.loc.save_... | 31.635514 | 116 | 0.656721 |
25b3c354d5a964b30d507656422152d813cc6751 | 4,036 | py | Python | got10k/datasets/got10k.py | ZhangSanFengByGit/toolkit | 9f2958bfd67d140afbc22f12c8d38995996330b0 | [
"MIT"
] | 1 | 2019-03-19T02:59:23.000Z | 2019-03-19T02:59:23.000Z | got10k/datasets/got10k.py | ZhangSanFengByGit/toolkit | 9f2958bfd67d140afbc22f12c8d38995996330b0 | [
"MIT"
] | null | null | null | got10k/datasets/got10k.py | ZhangSanFengByGit/toolkit | 9f2958bfd67d140afbc22f12c8d38995996330b0 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, print_function
import os
import glob
import numpy as np
import six
class GOT10k(object):
r"""`GOT-10K <http://got-10k.aitestunion.com//>`_ Dataset.
Publication:
``GOT-10k: A Large High-Diversity Benchmark for Generic Object
Tracking in the Wild``, L. H... | 37.37037 | 80 | 0.566898 |
3eb5aa31f910629dcd9e00fd97c08b90652a141a | 1,094 | py | Python | toolchain/riscv/MSYS/python/Lib/test/testcodec.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 207 | 2018-10-01T08:53:01.000Z | 2022-03-14T12:15:54.000Z | toolchain/riscv/MSYS/python/Lib/test/testcodec.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 8 | 2019-06-29T14:18:51.000Z | 2022-02-19T07:30:27.000Z | toolchain/riscv/MSYS/python/Lib/test/testcodec.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 76 | 2020-03-16T01:47:46.000Z | 2022-03-21T16:37:07.000Z | """ Test Codecs (used by test_charmapcodec)
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map... | 22.326531 | 69 | 0.66362 |
648e36332add911a915cd13b99630eb74de35431 | 741 | py | Python | django_fsm_log/admin.py | key-capture-energy/django-fsm-log | 8e45717b26239589167a3e3b070427a5ca3c80ca | [
"MIT"
] | 20 | 2022-01-19T08:31:57.000Z | 2022-03-23T08:47:05.000Z | django_fsm_log/admin.py | key-capture-energy/django-fsm-log | 8e45717b26239589167a3e3b070427a5ca3c80ca | [
"MIT"
] | 22 | 2022-01-14T14:26:14.000Z | 2022-03-27T15:25:34.000Z | django_fsm_log/admin.py | key-capture-energy/django-fsm-log | 8e45717b26239589167a3e3b070427a5ca3c80ca | [
"MIT"
] | 5 | 2022-01-14T21:59:03.000Z | 2022-03-21T16:45:28.000Z | from django.contrib.contenttypes.admin import GenericTabularInline
from django.db.models import F
from .models import StateLog
__all__ = ("StateLogInline",)
class StateLogInline(GenericTabularInline):
model = StateLog
can_delete = False
def has_add_permission(self, request, obj=None):
return Fa... | 22.454545 | 76 | 0.65857 |
f596ffe3dd6ed7e4817d705ff8a9e3d170a2ca56 | 6,039 | py | Python | codegen/parse.py | nonebot/adapter-qqguild | a3e4d353bfdaafb296743bc0f15ed5d643c64d85 | [
"MIT"
] | 39 | 2021-12-23T14:26:41.000Z | 2022-03-22T14:11:19.000Z | codegen/parse.py | nonebot/adapter-qqguild | a3e4d353bfdaafb296743bc0f15ed5d643c64d85 | [
"MIT"
] | 4 | 2022-01-22T17:59:50.000Z | 2022-03-22T12:40:10.000Z | codegen/parse.py | nonebot/adapter-qqguild | a3e4d353bfdaafb296743bc0f15ed5d643c64d85 | [
"MIT"
] | 2 | 2022-01-16T02:38:51.000Z | 2022-03-01T15:48:36.000Z | import warnings
from urllib.parse import urlparse
from contextvars import ContextVar
from typing import Any, Dict, List, Tuple, Optional
from yarl import URL
from pydantic import parse_obj_as
from .config import Config
from .source import Source
from .model import API, Type, Object, DataType, PathParam, QueryParam, o... | 34.508571 | 87 | 0.489154 |
292c8383b7eea30cf6d972f33570327843279dd0 | 13,476 | py | Python | xnas/pruning/pruning/iterative_pruner.py | dercaft/XNAS | d6d0fde0d4475210a41607181939188b177e44b1 | [
"MIT"
] | 2 | 2021-09-23T01:59:19.000Z | 2021-12-13T04:28:38.000Z | nni/algorithms/compression/v2/pytorch/pruning/iterative_pruner.py | Micheallei/nni | 29fd8cfae4fe99b08a91f9a67be4297093483832 | [
"MIT"
] | 1 | 2020-06-30T08:49:53.000Z | 2020-06-30T08:49:53.000Z | nni/algorithms/compression/v2/pytorch/pruning/iterative_pruner.py | Micheallei/nni | 29fd8cfae4fe99b08a91f9a67be4297093483832 | [
"MIT"
] | 2 | 2021-12-17T07:32:47.000Z | 2021-12-19T08:45:05.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import logging
from typing import Dict, List, Callable, Optional
from torch import Tensor
from torch.nn import Module
from .basic_pruner import (
LevelPruner,
L1NormPruner,
L2NormPruner,
FPGMPruner,
SlimPruner,
Activatio... | 52.232558 | 141 | 0.65331 |
8d6a522c88a37f3262602b654fe9be4cfce86a5b | 1,437 | py | Python | setup.py | nicoloverardo/matrix_regression | 03fb5dc79792e0a12dc787ce476eaff55b49a5cc | [
"MIT"
] | null | null | null | setup.py | nicoloverardo/matrix_regression | 03fb5dc79792e0a12dc787ce476eaff55b49a5cc | [
"MIT"
] | null | null | null | setup.py | nicoloverardo/matrix_regression | 03fb5dc79792e0a12dc787ce476eaff55b49a5cc | [
"MIT"
] | null | null | null | from distutils.core import setup
from setuptools import find_packages
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="matrixreg",
packages=find_packages(),
version="0.1.1",
license="MIT",
description="Implementation of the MatrixRegression (MR) ... | 35.925 | 154 | 0.652749 |
b89bc48c3d81574bdb6b7ace56f57dbb966eaa01 | 3,881 | py | Python | LibrairieVideoAna/Unclean/BehavClasses.py | JostTim/custom_libs | 8f9e3f45c6f5f7e47b6582e072d09a8910efddd3 | [
"MIT"
] | null | null | null | LibrairieVideoAna/Unclean/BehavClasses.py | JostTim/custom_libs | 8f9e3f45c6f5f7e47b6582e072d09a8910efddd3 | [
"MIT"
] | null | null | null | LibrairieVideoAna/Unclean/BehavClasses.py | JostTim/custom_libs | 8f9e3f45c6f5f7e47b6582e072d09a8910efddd3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 30 13:33:55 2018
@author: Timothe
"""
import numpy as np
import math
import pickle
import re
class MazeData:
def __init__(self, Filename):
self.Filename = Filename
regexpresult=re.match(r"(.*mouse([0-9]+)_([0-9]+)).txt", self.Filename)
... | 36.961905 | 133 | 0.519711 |
8853601dd9b4a449a9cd05b8f031861545ef22cc | 1,001 | py | Python | scanner/Multiprocess-Scanner.py | AabhaasSinghal/python_scripts | b41803bff049fa65ed43a0313471c3c72fa59912 | [
"Apache-2.0"
] | null | null | null | scanner/Multiprocess-Scanner.py | AabhaasSinghal/python_scripts | b41803bff049fa65ed43a0313471c3c72fa59912 | [
"Apache-2.0"
] | null | null | null | scanner/Multiprocess-Scanner.py | AabhaasSinghal/python_scripts | b41803bff049fa65ed43a0313471c3c72fa59912 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from multiprocessing import Process, Queue
from scapy.all import *
import sys
import Queue as TQ
def WorkerProcess(ip, pid, q) :
while True :
port = 0
try :
port = q.get(block=False)
except TQ.Empty :
print "Worker %d exiting ..." % (pid)
return 0
# port scanning to ... | 22.244444 | 83 | 0.652348 |
9dfdd8703588363ee1eea5908bcc540d8de82715 | 12,754 | py | Python | test/distributed/_shard/test_replicated_tensor.py | stungkit/pytorch | 0f05e398705bf15406bce79f7ee57d3935ad2abd | [
"Intel"
] | null | null | null | test/distributed/_shard/test_replicated_tensor.py | stungkit/pytorch | 0f05e398705bf15406bce79f7ee57d3935ad2abd | [
"Intel"
] | 1 | 2022-01-10T18:39:28.000Z | 2022-01-10T19:15:57.000Z | test/distributed/_shard/test_replicated_tensor.py | stungkit/pytorch | 0f05e398705bf15406bce79f7ee57d3935ad2abd | [
"Intel"
] | 1 | 2022-03-26T14:42:50.000Z | 2022-03-26T14:42:50.000Z | # Owner(s): ["oncall: distributed"]
import io
import torch
import torch.distributed._shard.sharded_tensor as sharded_tensor
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
from torch.distributed._shard import _shard_tensor
from torch.distributed._shard.replicated_tensor ... | 37.845697 | 95 | 0.655873 |
0fc1557fe17715f0bcdbb2d6a415b9273f1c4a82 | 1,082 | py | Python | libra/datasets.py | kamranmajid41/libra | 10635d6799b7ad32523402551e9d3d2e8f6df285 | [
"MIT"
] | null | null | null | libra/datasets.py | kamranmajid41/libra | 10635d6799b7ad32523402551e9d3d2e8f6df285 | [
"MIT"
] | null | null | null | libra/datasets.py | kamranmajid41/libra | 10635d6799b7ad32523402551e9d3d2e8f6df285 | [
"MIT"
] | null | null | null | from download import download
import pandas as pd
import os
_dataset_links = {
'housing': 'https://download1325.mediafire.com/5sm8nmw2gixg/x8m5sol30wz5kjq/5227_7876_bundle_archive+%282%29.zip',
'fake job postings': 'https://download855.mediafire.com/kezk0rq1ogzg/ikvbeoyirm92qpf/533871_976879_bundle_archive.zi... | 37.310345 | 123 | 0.719039 |
ff22465618848bbe7eed058b60610eb26f452382 | 9,451 | py | Python | Patch/Adafruit_MotorHAT_Motors.py | ELSPL/EduBot-2WD | d3ef0a85cf87819e9145cc8ec44f0891932c6161 | [
"Apache-2.0"
] | null | null | null | Patch/Adafruit_MotorHAT_Motors.py | ELSPL/EduBot-2WD | d3ef0a85cf87819e9145cc8ec44f0891932c6161 | [
"Apache-2.0"
] | null | null | null | Patch/Adafruit_MotorHAT_Motors.py | ELSPL/EduBot-2WD | d3ef0a85cf87819e9145cc8ec44f0891932c6161 | [
"Apache-2.0"
] | 1 | 2019-06-27T11:12:29.000Z | 2019-06-27T11:12:29.000Z | import time
from Adafruit_MotorHAT.Adafruit_PWM_Servo_Driver import PWM
class Adafruit_StepperMotor:
MICROSTEPS = 8
MICROSTEP_CURVE = [0, 50, 98, 142, 180, 212, 236, 250, 255]
#MICROSTEPS = 16
# a sinusoidal curve NOT LINEAR!
#MICROSTEP_CURVE = [0, 25, 50, 74, 98, 120, 141, 162, 180, 197, 212, 2... | 36.774319 | 102 | 0.534864 |
082907747772cc1a7bcb4aba0637025015e8248d | 1,234 | py | Python | scrapers/scrape_bl_common.py | brunis83/covid_19 | 7851abcd9b472931051123caada6a64bc5fce2b5 | [
"CC-BY-4.0"
] | 485 | 2020-03-10T20:10:44.000Z | 2022-03-27T16:11:30.000Z | scrapers/scrape_bl_common.py | mariaguskova/covid_19 | 24d8f7a30e63d8683ebbfdcf868ff67c430fcd18 | [
"CC-BY-4.0"
] | 682 | 2020-03-17T09:55:12.000Z | 2022-03-28T15:16:24.000Z | scrapers/scrape_bl_common.py | mariaguskova/covid_19 | 24d8f7a30e63d8683ebbfdcf868ff67c430fcd18 | [
"CC-BY-4.0"
] | 224 | 2020-03-09T11:42:13.000Z | 2022-03-22T13:16:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
from bs4 import BeautifulSoup
import re
import scrape_common as sc
def get_latest_bl_bulletin_url():
return get_all_bl_bulletin_urls()[0]
def get_all_bl_bulletin_urls():
news_url = 'https://www.baselland.ch/politik-und-behorden/direktionen/volk... | 31.641026 | 212 | 0.6953 |
616c509bb28b80d8ad129e7922b26a3c5bec6e7b | 597 | py | Python | setup.py | ckxckx/lolviz | 19d7d7a5352bfdd0a4fc236b904e81481bd3146f | [
"BSD-3-Clause"
] | 790 | 2017-08-26T19:32:59.000Z | 2022-03-31T21:53:20.000Z | setup.py | ckxckx/lolviz | 19d7d7a5352bfdd0a4fc236b904e81481bd3146f | [
"BSD-3-Clause"
] | 23 | 2017-08-28T09:06:29.000Z | 2022-01-12T03:26:36.000Z | setup.py | ckxckx/lolviz | 19d7d7a5352bfdd0a4fc236b904e81481bd3146f | [
"BSD-3-Clause"
] | 46 | 2017-08-27T17:27:23.000Z | 2022-03-04T08:34:38.000Z | from setuptools import setup
setup(
name='lolviz',
version='1.4.4',
url='https://github.com/parrt/lolviz',
license='BSD',
py_modules=['lolviz'],
author='Terence Parr',
author_email='parrt@antlr.org',
install_requires=['graphviz'], # needs numpy if you use ndarrayviz()
description='A... | 35.117647 | 135 | 0.678392 |
932eb33ecd1245a2cf138e82cb99a8142499d6de | 22,675 | py | Python | tests/core/test_actions.py | Phillammon/rasa | c3d1738e9a9a3d76b37a01258a3813f0fc90d852 | [
"Apache-2.0"
] | 1 | 2020-08-09T13:28:37.000Z | 2020-08-09T13:28:37.000Z | tests/core/test_actions.py | m0sesa/rasa | 219baa461c066a199fb4fb10a123012ebc8182b3 | [
"Apache-2.0"
] | 75 | 2020-08-06T08:55:42.000Z | 2022-03-01T13:22:11.000Z | tests/core/test_actions.py | m0sesa/rasa | 219baa461c066a199fb4fb10a123012ebc8182b3 | [
"Apache-2.0"
] | null | null | null | from typing import List
import pytest
from aioresponses import aioresponses
import rasa.core
from rasa.core.actions import action
from rasa.core.actions.action import (
ACTION_BACK_NAME,
ACTION_DEACTIVATE_FORM_NAME,
ACTION_DEFAULT_ASK_AFFIRMATION_NAME,
ACTION_DEFAULT_ASK_REPHRASE_NAME,
ACTION_DEFA... | 31.58078 | 87 | 0.637707 |
d384ebaa2e9457c9c168c9be12cd49e3557180a8 | 3,915 | py | Python | tests/test_algorithms_authenticated.py | Algorithmism/quantopian-tools | a57afa7d16286f502e236e32525fbde552028627 | [
"BSD-3-Clause"
] | 1 | 2022-01-31T10:53:53.000Z | 2022-01-31T10:53:53.000Z | tests/test_algorithms_authenticated.py | Algorithmism/quantopian-tools | a57afa7d16286f502e236e32525fbde552028627 | [
"BSD-3-Clause"
] | null | null | null | tests/test_algorithms_authenticated.py | Algorithmism/quantopian-tools | a57afa7d16286f502e236e32525fbde552028627 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, division, unicode_literals
import datetime
import pytest
from quantopian_tools import algorithms
skip_auth_tests = pytest.mark.skip(reason="no way of currently testing this")
@skip_auth_tests
def test_get_algorithm_ids(authenticated_b... | 30.348837 | 92 | 0.547126 |
6ab38697889f9e01ac38643f92545223c34c21eb | 154 | py | Python | manatsum/urls.py | mashabow/manatsum | 0497a39537f35bdcb236f3b341de7145ebdc1dcb | [
"MIT"
] | 2 | 2015-08-25T18:10:42.000Z | 2017-01-12T00:00:57.000Z | manatsum/urls.py | mashabow/manatsum | 0497a39537f35bdcb236f3b341de7145ebdc1dcb | [
"MIT"
] | null | null | null | manatsum/urls.py | mashabow/manatsum | 0497a39537f35bdcb236f3b341de7145ebdc1dcb | [
"MIT"
] | null | null | null | # coding: utf-8
from django.conf.urls import patterns, include, url
import app.urls
urlpatterns = patterns(
'',
url(r'^', include(app.urls)),
)
| 15.4 | 51 | 0.662338 |
47f4f9cea94084795de65738b35f9f184f7c912f | 111 | py | Python | theano/d3viz/__init__.py | MarcCote/Theano | f0d293161a624ccf10c60ee8405a92e7d321151a | [
"BSD-3-Clause"
] | 95 | 2019-05-14T20:55:26.000Z | 2022-03-26T13:32:42.000Z | theano/d3viz/__init__.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 7 | 2019-11-25T08:24:47.000Z | 2021-09-12T13:29:14.000Z | theano/d3viz/__init__.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 30 | 2016-10-27T21:59:00.000Z | 2021-02-20T09:55:14.000Z | from __future__ import absolute_import, print_function, division
from theano.d3viz.d3viz import d3viz, d3write
| 37 | 64 | 0.855856 |
c342423c7def03062d78f01e600efda75944a649 | 3,408 | py | Python | pytorch_toolkit/nncf/nncf/debug.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 3 | 2020-12-29T02:47:32.000Z | 2021-11-12T08:12:51.000Z | pytorch_toolkit/nncf/nncf/debug.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 23 | 2020-09-25T22:41:48.000Z | 2021-12-13T20:43:37.000Z | pytorch_toolkit/nncf/nncf/debug.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 1 | 2021-03-12T10:08:44.000Z | 2021-03-12T10:08:44.000Z | """
Copyright (c) 2019-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... | 31.555556 | 104 | 0.690141 |
bc45d3f6e5901f5d9d89cde4a78ec0fc38fb9384 | 36,978 | py | Python | ironic/common/neutron.py | inmotionhosting/ironic | 1c7b5f82592e23ab66dddca56e0b059d3cb0710b | [
"Apache-2.0"
] | null | null | null | ironic/common/neutron.py | inmotionhosting/ironic | 1c7b5f82592e23ab66dddca56e0b059d3cb0710b | [
"Apache-2.0"
] | null | null | null | ironic/common/neutron.py | inmotionhosting/ironic | 1c7b5f82592e23ab66dddca56e0b059d3cb0710b | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 37.351515 | 79 | 0.64533 |
e7bf018d2db44f390f3f58d24c8a6b93acb1f0af | 2,331 | py | Python | src/callosum/auth.py | bohblue2/callosum | adb8f6aa2d44cd3c4448f6899027a2964eca380a | [
"MIT"
] | 19 | 2018-08-17T15:58:43.000Z | 2022-03-31T07:12:43.000Z | src/callosum/auth.py | bohblue2/callosum | adb8f6aa2d44cd3c4448f6899027a2964eca380a | [
"MIT"
] | 9 | 2018-11-15T15:44:11.000Z | 2019-12-06T15:32:57.000Z | src/callosum/auth.py | bohblue2/callosum | adb8f6aa2d44cd3c4448f6899027a2964eca380a | [
"MIT"
] | 2 | 2018-05-16T06:02:39.000Z | 2020-07-24T06:30:58.000Z | from __future__ import annotations
import abc
from typing import Optional
import attr
import zmq
@attr.dataclass(frozen=True, slots=True)
class AuthResult:
success: bool
user_id: Optional[str] = None
@attr.dataclass(frozen=True, slots=True)
class Identity:
domain: str
private_key: bytes
def crea... | 27.104651 | 85 | 0.668812 |
a770dc31980cbaa5d5c4bc3044b1a567442c387b | 14,710 | py | Python | python/ray/util/placement_group.py | decypherdatalabs/ray-1 | 214ad08cb9f7299b9b9cf2c8a4cb51d9e25f9f90 | [
"Apache-2.0"
] | null | null | null | python/ray/util/placement_group.py | decypherdatalabs/ray-1 | 214ad08cb9f7299b9b9cf2c8a4cb51d9e25f9f90 | [
"Apache-2.0"
] | null | null | null | python/ray/util/placement_group.py | decypherdatalabs/ray-1 | 214ad08cb9f7299b9b9cf2c8a4cb51d9e25f9f90 | [
"Apache-2.0"
] | 1 | 2022-03-27T09:01:59.000Z | 2022-03-27T09:01:59.000Z | from typing import Dict, Union, List, Optional
import ray
from ray._raylet import ObjectRef
from ray._raylet import PlacementGroupID
from ray._private.utils import hex_to_binary
from ray.util.annotations import PublicAPI, DeveloperAPI
from ray.ray_constants import to_memory_units
from ray._private.client_mode_hook imp... | 35.107399 | 88 | 0.670292 |
798029399b5176044bae3f40170e9f1db85540e3 | 198 | py | Python | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from solutions_automation.vdc.dashboard.common import CommonChatBot
from jumpscale.packages.vdc_dashboard.chats.gitea import GiteaDeploy
class GiteaAutomated(CommonChatBot, GiteaDeploy):
pass
| 28.285714 | 68 | 0.853535 |
8a43b1b64f7e792ab618f6134e411f90027fae8c | 40,793 | py | Python | qsurface/plot.py | watermarkhu/Toric_code | 9817d9b188d397c1478410aef6f92e5508e45b57 | [
"BSD-3-Clause"
] | 14 | 2020-12-10T15:10:08.000Z | 2022-03-10T00:34:39.000Z | qsurface/plot.py | siddhantphy/qsurface | 88005c4e7c1c72b765caf695926be001c2e89756 | [
"BSD-3-Clause"
] | 28 | 2020-06-23T14:39:25.000Z | 2020-11-10T20:01:45.000Z | Lib/site-packages/qsurface/plot.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 9 | 2021-01-12T16:04:26.000Z | 2022-03-10T00:34:45.000Z | from abc import ABC, abstractmethod
from typing import Optional, Tuple, Union
from dataclasses import dataclass
import matplotlib as mpl
from matplotlib import pyplot as plt
from matplotlib.artist import Artist
from matplotlib.lines import Line2D
from matplotlib.widgets import Button
from matplotlib.blocking_input impo... | 44.388466 | 771 | 0.589586 |
e7a3797fe27f2540dbedcc0f4767a7976ebdc8dc | 439 | py | Python | packages/python/plotly/plotly/validators/scatter/marker/line/_reversescale.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/scatter/marker/line/_reversescale.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/scatter/marker/line/_reversescale.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="reversescale", parent_name="scatter.marker.line", **kwargs
):
super(ReversescaleValidator, self).__init__(
plotly_name=plotly_name,
... | 31.357143 | 85 | 0.667426 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.