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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5e3d244ca30eb8595997e215616b196f94f21e27 | 3,755 | py | Python | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ListClusterForAdminRequest.py | DataDog/aliyun-openapi-python-sdk | 5cbee29bce6416dd62f61f0c3786b1af6ea0d84f | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ListClusterForAdminRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ListClusterForAdminRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.526786 | 83 | 0.742477 |
c8591d4c5f38a220202e2f431ef0184603bcf83d | 678 | py | Python | my/core/dataset.py | aluhrs13/HPI | e750666e30e8987f3a4c46755857dc85dd64446c | [
"MIT"
] | 1,026 | 2020-03-16T16:53:29.000Z | 2022-03-29T16:03:38.000Z | my/core/dataset.py | aluhrs13/HPI | e750666e30e8987f3a4c46755857dc85dd64446c | [
"MIT"
] | 102 | 2020-03-18T22:53:29.000Z | 2022-03-22T00:34:46.000Z | my/core/dataset.py | aluhrs13/HPI | e750666e30e8987f3a4c46755857dc85dd64446c | [
"MIT"
] | 50 | 2020-03-17T21:00:34.000Z | 2022-03-28T08:37:13.000Z | from .common import assert_subpackage; assert_subpackage(__name__)
from .common import PathIsh
from .sqlite import sqlite_connect_immutable
# TODO wonder if also need to open without WAL.. test this on read-only directory/db file
def connect_readonly(db: PathIsh):
import dataset # type: ignore
# see https://... | 45.2 | 92 | 0.766962 |
83b8346ee99e4989e5338b6a5846ccf31a4aad24 | 326 | py | Python | shop/apps/accounts/urls.py | Yariquezz/shop | 637fe6c3c5639610dc3f241fbcf8147b30b198ac | [
"Apache-2.0"
] | null | null | null | shop/apps/accounts/urls.py | Yariquezz/shop | 637fe6c3c5639610dc3f241fbcf8147b30b198ac | [
"Apache-2.0"
] | 1 | 2022-02-20T10:12:39.000Z | 2022-02-20T10:12:39.000Z | shop/apps/accounts/urls.py | Yariquezz/shop | 637fe6c3c5639610dc3f241fbcf8147b30b198ac | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
app_name = 'accounts'
urlpatterns = [
path('', views.login_form, name='login'),
path('register/', views.register_form, name='register'),
path('logout/', views.logout_form, name='logout'),
path('activate/<uidb64>/(<token>/', views.activate, name='activat... | 27.166667 | 72 | 0.674847 |
4e254f6fb46863c152c7e3cca4267818d1e4cdd9 | 964 | py | Python | selvbetjening/core/events/utils.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | null | null | null | selvbetjening/core/events/utils.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | 3 | 2020-02-11T21:54:59.000Z | 2021-06-10T17:35:21.000Z | selvbetjening/core/events/utils.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | null | null | null |
def sum_attendee_payment_status(attendees):
# Initialize base values for all totals
total = {'potential': 0, 'potential_total': 0,
'overpaid': 0, 'overpaid_total': 0,
'underpaid': 0, 'underpaid_total': 0,
'unpaid': 0, 'unpaid_total': 0,
'realised': 0, 'reali... | 30.125 | 65 | 0.574689 |
4de4405481434668e0ac3c4a90ad911f0504f66f | 676 | py | Python | Python/17 - 078 - maior e menor valores na lista.py | matheusguerreiro/python | f39a1b92409f11cbe7fef5d9261f863f9e0fac0d | [
"MIT"
] | null | null | null | Python/17 - 078 - maior e menor valores na lista.py | matheusguerreiro/python | f39a1b92409f11cbe7fef5d9261f863f9e0fac0d | [
"MIT"
] | null | null | null | Python/17 - 078 - maior e menor valores na lista.py | matheusguerreiro/python | f39a1b92409f11cbe7fef5d9261f863f9e0fac0d | [
"MIT"
] | null | null | null | # Aula 17 (Listas (Parte 1))
numeros = []
maior = menor = 0
for c in range(0, 5):
numeros.append(int(input('Digite um Número: ')))
if c == 0:
maior = numeros[0]
menor = numeros[0]
else:
if numeros[c] > maior:
maior = numeros[c]
if numeros[c] < menor:
... | 26 | 52 | 0.554734 |
a0e33b61859404a2c1a75da8d96d9823f948c8e9 | 10,922 | py | Python | nnpy/nn/layers.py | danny-1k/nnpy | d6ab503ca92e8eb84de061f66f646a932686cfab | [
"MIT"
] | null | null | null | nnpy/nn/layers.py | danny-1k/nnpy | d6ab503ca92e8eb84de061f66f646a932686cfab | [
"MIT"
] | null | null | null | nnpy/nn/layers.py | danny-1k/nnpy | d6ab503ca92e8eb84de061f66f646a932686cfab | [
"MIT"
] | null | null | null | import numpy as np
from ..core.base import Layer,Function
from ..core.utils import create_graph
from .activations import Tanh,Softmax
class Linear(Layer):
def __init__(self,in_,out_):
super().__init__()
self.in_dims = in_
self.out_dims = out_
self.params = {'w':np.random.uniform(-np... | 29.760218 | 125 | 0.537447 |
5819e6983f4a4dc3c2f1c67415ea311086c29bc5 | 1,319 | py | Python | setup.py | lcopey/comicsreader | f5e14a53bcf7cfd101d94d2fa57af83ba06f4266 | [
"MIT"
] | null | null | null | setup.py | lcopey/comicsreader | f5e14a53bcf7cfd101d94d2fa57af83ba06f4266 | [
"MIT"
] | null | null | null | setup.py | lcopey/comicsreader | f5e14a53bcf7cfd101d94d2fa57af83ba06f4266 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [ ]
test_requirements = [ ]
setup(
author="Laurent Copey... | 29.311111 | 103 | 0.657316 |
09eba62d98f026d41355a209e29bd5716320224d | 2,395 | py | Python | quant/config.py | CSeanXu/thenextquant | 81b6392390d7db8f555bfeabe65dc23174bb96ed | [
"MIT"
] | 4 | 2021-06-19T04:00:30.000Z | 2022-01-27T15:53:57.000Z | quant/config.py | CSeanXu/thenextquant | 81b6392390d7db8f555bfeabe65dc23174bb96ed | [
"MIT"
] | null | null | null | quant/config.py | CSeanXu/thenextquant | 81b6392390d7db8f555bfeabe65dc23174bb96ed | [
"MIT"
] | 18 | 2020-10-10T01:31:56.000Z | 2022-02-26T00:21:19.000Z | # -*- coding:utf-8 -*-
"""
Config module.
Author: HuangTao
Date: 2018/05/03
Email: huangtao@ifclover.com
"""
import json
from quant.utils import tools
class Config:
""" Config module will load a json file like `config.json` and parse the content to json object.
1. Configure content must be key-valu... | 30.705128 | 105 | 0.57119 |
48835b8c2e7bddd9d0ee1ef6bd2e4f95554d54a4 | 2,107 | py | Python | lib/addons_importer.py | curtjen/clither | b62bb663aa75edc189455c5bd857437623fbf691 | [
"MIT"
] | null | null | null | lib/addons_importer.py | curtjen/clither | b62bb663aa75edc189455c5bd857437623fbf691 | [
"MIT"
] | null | null | null | lib/addons_importer.py | curtjen/clither | b62bb663aa75edc189455c5bd857437623fbf691 | [
"MIT"
] | null | null | null | #!/bin/env python
"""
"""
import json
import re
import os
from helpers import (run_cmd, create_directory, paths, mk_clither_custom_dirs,
get_dir_list, get_epoc_time, get_new_path, cd)
EXCEPTION_TMP = """Config file does not exist: {0}
To generate, then edit, a template config.json try running:
$ ./clither --mk... | 26.670886 | 78 | 0.698624 |
55ff1b7b1f69a1306173131f0cb761090b6b262a | 8,377 | py | Python | core/controllers/topics_and_skills_dashboard.py | sagangwee/oppia | c4bf0673b4d3ec30cff609109241656f71a63a82 | [
"Apache-2.0"
] | null | null | null | core/controllers/topics_and_skills_dashboard.py | sagangwee/oppia | c4bf0673b4d3ec30cff609109241656f71a63a82 | [
"Apache-2.0"
] | 7 | 2019-08-20T08:30:43.000Z | 2022-02-12T18:47:57.000Z | core/controllers/topics_and_skills_dashboard.py | ledriod/oppia | 4f8f95c6689cd36f0b65672b80d98a3463b001f8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 39.701422 | 80 | 0.6679 |
53d1c9ffe51c46610daf8e3d706981ffc4ed3a2b | 40,273 | py | Python | frappe/core/doctype/user/user.py | stermic2/frappe | a88ccdb0391b78b121c5ce1a97d6adcc829cd3ce | [
"MIT"
] | 1 | 2021-12-28T07:51:51.000Z | 2021-12-28T07:51:51.000Z | frappe/core/doctype/user/user.py | stermic2/frappe | a88ccdb0391b78b121c5ce1a97d6adcc829cd3ce | [
"MIT"
] | null | null | null | frappe/core/doctype/user/user.py | stermic2/frappe | a88ccdb0391b78b121c5ce1a97d6adcc829cd3ce | [
"MIT"
] | 1 | 2018-03-06T03:46:08.000Z | 2018-03-06T03:46:08.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from bs4 import BeautifulSoup
import frappe
import frappe.share
import frappe.defaults
import frappe.permissions
from frappe.model.document import Document
from frappe.utils import (cint, flt, has_gravatar, escape_html, ... | 32.347791 | 213 | 0.728726 |
868193523821f4d5b281424ad2e544b5c07186a0 | 12,622 | py | Python | ts_process/her2bbp.py | SCECcode/ts-process | 82f172231242e05e0e7103459a370c0d6ccbf7de | [
"BSD-3-Clause"
] | 6 | 2020-03-15T18:48:42.000Z | 2021-07-15T23:12:27.000Z | ts_process/her2bbp.py | SCECcode/ts-process | 82f172231242e05e0e7103459a370c0d6ccbf7de | [
"BSD-3-Clause"
] | 1 | 2018-10-30T22:25:10.000Z | 2020-07-16T15:25:21.000Z | ts_process/her2bbp.py | SCECcode/ts-process | 82f172231242e05e0e7103459a370c0d6ccbf7de | [
"BSD-3-Clause"
] | 3 | 2018-03-23T18:37:30.000Z | 2020-06-24T14:27:27.000Z | #!/usr/bin/env python3
"""
BSD 3-Clause License
Copyright (c) 2020, Southern California Earthquake Center
All rights reserved.
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 th... | 38.95679 | 82 | 0.580019 |
99f7ef540790be01cbca33fc60583c6d8c687d41 | 45 | py | Python | src/own/test2.py | sjtumultiagent/on-policy-main | 5b9750569059576c555534490272dd1e7d45e5bb | [
"MIT"
] | null | null | null | src/own/test2.py | sjtumultiagent/on-policy-main | 5b9750569059576c555534490272dd1e7d45e5bb | [
"MIT"
] | null | null | null | src/own/test2.py | sjtumultiagent/on-policy-main | 5b9750569059576c555534490272dd1e7d45e5bb | [
"MIT"
] | null | null | null | a = "/test/src"
b = "run"
c = a / b
print(c)
| 9 | 15 | 0.466667 |
7e12df7ff8e8ff280613ff3632a2b55dd45f5384 | 10,468 | py | Python | Software/Estadística/Datos/Datos_pantheon/Cosas_viejas/Datos_pantheon(original)/libres6737.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/Datos/Datos_pantheon/Cosas_viejas/Datos_pantheon(original)/libres6737.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/Datos/Datos_pantheon/Cosas_viejas/Datos_pantheon(original)/libres6737.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | #en este programa vamos a calcular el chi2 MOG-sn considerando todos los parametros libres. Ojo que tenemos menos dof. Hay que prestarle atencion al valor de H0.
import math
import numpy as np
from numpy.linalg import inv
import matplotlib.pyplot as mp
from scipy import optimize
from scipy.integrate import simps
c=3.0... | 53.682051 | 334 | 0.685422 |
9a04641b79208a1c33fdc009894af98727a073d0 | 1,212 | py | Python | Contest/LeetCode/WeeklyContest196/4.py | WatsonWangZh/CodingPractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 11 | 2019-09-01T22:36:00.000Z | 2021-11-08T08:57:20.000Z | Contest/LeetCode/WeeklyContest196/4.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | null | null | null | Contest/LeetCode/WeeklyContest196/4.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 2 | 2020-05-27T14:58:52.000Z | 2020-05-27T15:04:17.000Z | # 1505. Minimum Possible Integer After at Most K Adjacent Swaps On Digits
# User Accepted:259
# User Tried:919
# Total Accepted:273
# Total Submissions:1835
# Difficulty:Hard
# Given a string num representing the digits of a very large integer and an integer k.
# You are allowed to swap any two adjacent digits of the i... | 29.560976 | 119 | 0.697195 |
f82c6c17abea8c10c556bc6633647af470f8ff9d | 202 | py | Python | demo_photo_face_rec.py | AntonFirc/SUR | 3173a80731e601cdcc590166a8ba2ef801e60325 | [
"MIT"
] | null | null | null | demo_photo_face_rec.py | AntonFirc/SUR | 3173a80731e601cdcc590166a8ba2ef801e60325 | [
"MIT"
] | null | null | null | demo_photo_face_rec.py | AntonFirc/SUR | 3173a80731e601cdcc590166a8ba2ef801e60325 | [
"MIT"
] | null | null | null | import sys
import os
sys.path.append(os.path.abspath('./photo'))
from photo_face_recognition import PhotoFaceRecognition
pr = PhotoFaceRecognition()
pr.train_model()
pr.eval_model()
pr.label_data()
| 15.538462 | 55 | 0.787129 |
c146dad757348601ef4766cf2e3e3a0fd1ab920b | 653 | py | Python | awards/migrations/0002_image.py | humphrey-mutuma/Awards | 4d5c934d503cdcb5466e7a345c57bfd62fb3c90f | [
"MIT"
] | 1 | 2019-09-09T13:45:42.000Z | 2019-09-09T13:45:42.000Z | awards/migrations/0002_image.py | humphrey-mutuma/Awards | 4d5c934d503cdcb5466e7a345c57bfd62fb3c90f | [
"MIT"
] | 4 | 2021-03-19T03:30:10.000Z | 2021-09-08T01:16:55.000Z | awards/migrations/0002_image.py | humphrey-mutuma/Awards | 4d5c934d503cdcb5466e7a345c57bfd62fb3c90f | [
"MIT"
] | 2 | 2020-12-28T13:41:55.000Z | 2021-01-21T10:07:47.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-09-09 02:57
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('awards', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 27.208333 | 114 | 0.589587 |
c5c4539a444455a3088123c7d35e1f54cf3ac49f | 5,449 | py | Python | tests/test_visualizer.py | sailfish009/mydl_C | db6d413145320a5f22f8287e1789e1336d163d8a | [
"Apache-2.0"
] | null | null | null | tests/test_visualizer.py | sailfish009/mydl_C | db6d413145320a5f22f8287e1789e1336d163d8a | [
"Apache-2.0"
] | null | null | null | tests/test_visualizer.py | sailfish009/mydl_C | db6d413145320a5f22f8287e1789e1336d163d8a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# File:
import numpy as np
import unittest
import torch
from mydl.data import MetadataCatalog
from mydl.structures import BoxMode, Instances, RotatedBoxes
from mydl.utils.visualizer import Visualizer
class TestVisualizer(... | 37.840278 | 93 | 0.594972 |
4e6f571b68b12db750e76dbc1ef6bdd5996e6d07 | 11,921 | py | Python | detection/utils/image_processing.py | t9s9/BeeMeter | d0dfbf621a9147c047708a18540ba61266324176 | [
"MIT"
] | null | null | null | detection/utils/image_processing.py | t9s9/BeeMeter | d0dfbf621a9147c047708a18540ba61266324176 | [
"MIT"
] | null | null | null | detection/utils/image_processing.py | t9s9/BeeMeter | d0dfbf621a9147c047708a18540ba61266324176 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from detection.utils.box_tools import validate_boxes, clip_boxes
class Transformer:
def __init__(self, operations):
"""
Wrapper that applies every operation in 'operations' on all given images and labels.
:param operations: Array of operation classes or instan... | 40.003356 | 119 | 0.622934 |
3b73d9900ccef89fc6c1da434e105cd6f2aecebc | 6,986 | py | Python | log_caspase/model_620.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_caspase/model_620.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_caspase/model_620.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('C6A', ['C8pro'])
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C3ub')
Monomer('C3A', ['Xiap', 'ParpU', 'C6pro'])
Mo... | 69.86 | 296 | 0.818065 |
afc15e90d9828a9f2c1d934727fcd01b92cb3a0b | 242 | py | Python | lesson-03/solution-01.py | weibak/lessons | 414f030650427d7167c2e58ecb9f858c2e5edb40 | [
"BSD-3-Clause"
] | null | null | null | lesson-03/solution-01.py | weibak/lessons | 414f030650427d7167c2e58ecb9f858c2e5edb40 | [
"BSD-3-Clause"
] | null | null | null | lesson-03/solution-01.py | weibak/lessons | 414f030650427d7167c2e58ecb9f858c2e5edb40 | [
"BSD-3-Clause"
] | null | null | null | """
Дано выражение x = 2 + 2 * 2 - 2 / 2, расставить скобки таким образом, чтобы значение x было равно 2, найти два варианта решения задачи.
"""
x = (2 + 2 * 2 - 2)/2
print(x)
x = (2 + (2 * 2) - 2)/2
print(x)
| 18.615385 | 136 | 0.512397 |
b7499d2e71090efe5bad82a48a5dbd0f5204774a | 11,219 | py | Python | dcor/independence.py | vishalbelsare/dcor | e2380a5289245cac2e83f0b73ef83281bab2e855 | [
"MIT"
] | 98 | 2018-02-21T02:49:33.000Z | 2022-03-22T09:27:14.000Z | dcor/independence.py | vishalbelsare/dcor | e2380a5289245cac2e83f0b73ef83281bab2e855 | [
"MIT"
] | 33 | 2017-12-03T12:29:36.000Z | 2022-03-21T15:58:10.000Z | dcor/independence.py | vishalbelsare/dcor | e2380a5289245cac2e83f0b73ef83281bab2e855 | [
"MIT"
] | 19 | 2018-06-01T17:11:18.000Z | 2022-03-24T07:48:04.000Z | """
Functions for testing independence of several distributions.
The functions in this module provide methods for testing if
the samples generated from two random vectors are independent.
"""
import numpy as np
import scipy.stats
from . import _dcor_internals, _hypothesis
from ._dcor import u_distance_correlation_sqr... | 33.58982 | 79 | 0.610126 |
0273c9fe7bf28f09a7dc46bd636570ab46c8a8fa | 611 | py | Python | FusionIIIT/applications/gymkhana/migrations/0007_auto_20200608_2210.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 2 | 2020-01-24T16:34:54.000Z | 2020-08-01T05:09:24.000Z | FusionIIIT/applications/gymkhana/migrations/0007_auto_20200608_2210.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 1 | 2021-05-05T09:50:22.000Z | 2021-05-05T09:50:22.000Z | FusionIIIT/applications/gymkhana/migrations/0007_auto_20200608_2210.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 4 | 2020-01-16T17:00:08.000Z | 2020-06-30T15:58:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-06-08 22:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gymkhana', '0006_form_available'),
]
operations = [
migrations.RemoveField... | 24.44 | 101 | 0.610475 |
8f6bbe6c25f1d27a13fa43f676412aaf3e7f9f9e | 1,067 | py | Python | venv/lib/python2.7/sre_compile.py | sunlum/Deep-Semantic-Space-NST | 468ac2590385f48e65df12c1a3c9db0ed8d49477 | [
"MIT"
] | null | null | null | venv/lib/python2.7/sre_compile.py | sunlum/Deep-Semantic-Space-NST | 468ac2590385f48e65df12c1a3c9db0ed8d49477 | [
"MIT"
] | null | null | null | venv/lib/python2.7/sre_compile.py | sunlum/Deep-Semantic-Space-NST | 468ac2590385f48e65df12c1a3c9db0ed8d49477 | [
"MIT"
] | null | null | null | XSym
0039
264e7c0c6b5b66de290f52fca35869da
/anaconda2/lib/python2.7/sre_compile.py
... | 213.4 | 984 | 0.068416 |
fa4c13abdd6007ae526bf040755a6cad148cce5f | 273 | py | Python | tests/artificial/transf_BoxCox/trend_MovingMedian/cycle_30/ar_12/test_artificial_1024_BoxCox_MovingMedian_30_12_100.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_BoxCox/trend_MovingMedian/cycle_30/ar_12/test_artificial_1024_BoxCox_MovingMedian_30_12_100.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_BoxCox/trend_MovingMedian/cycle_30/ar_12/test_artificial_1024_BoxCox_MovingMedian_30_12_100.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 30, transform = "BoxCox", sigma = 0.0, exog_count = 100, ar_order = 12); | 39 | 168 | 0.736264 |
07dcb4ea60379297d9f51c40cda9318137596fd4 | 1,391 | py | Python | definitions/r909_jpn.py | fijam/gmdrec | bab2ca1f60a2ccd1ded16c0d5d382ff6896709de | [
"BSD-3-Clause"
] | 8 | 2021-11-02T09:52:05.000Z | 2022-02-05T14:34:44.000Z | definitions/r909_jpn.py | fijam/gmdrec | bab2ca1f60a2ccd1ded16c0d5d382ff6896709de | [
"BSD-3-Clause"
] | 13 | 2021-10-10T22:02:08.000Z | 2022-03-27T13:52:40.000Z | definitions/r909_jpn.py | fijam/gmdrec | bab2ca1f60a2ccd1ded16c0d5d382ff6896709de | [
"BSD-3-Clause"
] | 4 | 2021-11-01T22:27:16.000Z | 2022-03-29T02:20:17.000Z | """MZ-R909/R910/N1 Japanese firmware"""
import string
from itertools import chain
HOLD = 2.1
PRESS = 0.050
labelling_entry_stop = 2
charset_list = ['katakana', 'uppercase', 'lowercase', 'numbers']
set_initial = charset_list[0]
set_common = ["'", ',', '/', ':', ' ']
set_uppercase = list(string.ascii_uppercase)
set_lowe... | 49.678571 | 125 | 0.463695 |
4b0f74a1d29315a543c9c7bc8001d0456d82563b | 4,795 | py | Python | kats/graphics/plots.py | utkucanaytac/Kats | 9781615750a2f3b49f16cccf335b5c29fdfd181a | [
"MIT"
] | null | null | null | kats/graphics/plots.py | utkucanaytac/Kats | 9781615750a2f3b49f16cccf335b5c29fdfd181a | [
"MIT"
] | null | null | null | kats/graphics/plots.py | utkucanaytac/Kats | 9781615750a2f3b49f16cccf335b5c29fdfd181a | [
"MIT"
] | null | null | null | # 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.
# Utility functions for plotting
from typing import List
import numpy as np
import pandas as pd
try:
import plotly.graph_objs as go
... | 29.598765 | 83 | 0.491137 |
91905285e43c7d0d015921fc614c7db471a43f4b | 2,758 | py | Python | tests/test_nlp_question_generator.py | platiagro/tasks | a6103cb101eeed26381cdb170a11d0e1dc53d3ad | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-02-16T12:39:57.000Z | 2021-07-21T11:36:39.000Z | tests/test_nlp_question_generator.py | platiagro/tasks | a6103cb101eeed26381cdb170a11d0e1dc53d3ad | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 20 | 2020-10-26T18:05:27.000Z | 2021-11-30T19:05:22.000Z | tests/test_nlp_question_generator.py | platiagro/tasks | a6103cb101eeed26381cdb170a11d0e1dc53d3ad | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 7 | 2020-10-13T18:12:22.000Z | 2021-08-13T19:16:21.000Z | import os
import unittest
import uuid
import papermill
from tests import datasets, server
EXPERIMENT_ID = str(uuid.uuid4())
OPERATOR_ID = str(uuid.uuid4())
RUN_ID = str(uuid.uuid4())
class TestQuestionGenerator(unittest.TestCase):
def setUp(self):
# Set environment variables needed to run notebooks
... | 30.988764 | 68 | 0.526106 |
cfb6227c0f158afc74d19f10b2f2c39617dada51 | 78 | py | Python | ilastikrag/gui/util/__init__.py | ilastik/ilastikrag | e6cd157b25eaffed5283c48471f7b58a0e4889d7 | [
"BSD-3-Clause"
] | null | null | null | ilastikrag/gui/util/__init__.py | ilastik/ilastikrag | e6cd157b25eaffed5283c48471f7b58a0e4889d7 | [
"BSD-3-Clause"
] | 6 | 2017-10-21T00:03:33.000Z | 2021-12-21T17:30:17.000Z | ilastikrag/gui/util/__init__.py | ilastik/ilastikrag | e6cd157b25eaffed5283c48471f7b58a0e4889d7 | [
"BSD-3-Clause"
] | null | null | null | from .hierarchical_checklist_view import HierarchicalChecklistView, Checklist
| 39 | 77 | 0.910256 |
62fa47f44b8de69baffde88203181d515d951b57 | 7,964 | py | Python | lib/surface/compute/instance_groups/managed/update_instances.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/surface/compute/instance_groups/managed/update_instances.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instance_groups/managed/update_instances.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- 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... | 46.847059 | 109 | 0.711703 |
eeabc578fe87f5b766505d7334c285f5f559d5b3 | 7,742 | py | Python | train.py | Feiyu-Zhang/pytorch-semseg | 6e2875f0f6487df4821a39cbce339c60916deb34 | [
"MIT"
] | 3,348 | 2017-07-10T09:29:51.000Z | 2021-05-23T11:48:49.000Z | train.py | Feiyu-Zhang/pytorch-semseg | 6e2875f0f6487df4821a39cbce339c60916deb34 | [
"MIT"
] | 234 | 2017-07-12T11:09:23.000Z | 2021-05-11T15:19:39.000Z | train.py | Feiyu-Zhang/pytorch-semseg | 6e2875f0f6487df4821a39cbce339c60916deb34 | [
"MIT"
] | 922 | 2017-03-24T07:48:30.000Z | 2021-05-23T18:58:19.000Z | import os
import yaml
import time
import shutil
import torch
import random
import argparse
import numpy as np
from torch.utils import data
from tqdm import tqdm
from ptsemseg.models import get_model
from ptsemseg.loss import get_loss_function
from ptsemseg.loader import get_loader
from ptsemseg.utils import get_logge... | 33.66087 | 100 | 0.561354 |
8485c274a5780b52ee71d4082966858095e3da63 | 2,493 | py | Python | data/p4VQE/R4/benchmark/startQiskit_noisy826.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_noisy826.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_noisy826.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=14
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 27.097826 | 118 | 0.630967 |
b378f1a72c99eecf6cfa095da83118c638be4038 | 1,180 | py | Python | tests/bots/test_daniel_scheduled.py | tokyokit/daniel | 714190dd96da1c80c5a76b7f9d5412b5840dcd4d | [
"MIT"
] | null | null | null | tests/bots/test_daniel_scheduled.py | tokyokit/daniel | 714190dd96da1c80c5a76b7f9d5412b5840dcd4d | [
"MIT"
] | 1 | 2015-07-28T10:27:52.000Z | 2015-07-28T10:27:52.000Z | tests/bots/test_daniel_scheduled.py | tokyokit/daniel | 714190dd96da1c80c5a76b7f9d5412b5840dcd4d | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import, division, print_function
import datetime
import pytest
import logging
from src.bots.daniel import Daniel
BASE_URI = "/scheduled"
@pytest.mark.parametrize("input_datetime, expected", [
('2014-01-01 09:00:10', None),
('2014-01-01 10:00:01', "... | 25.106383 | 72 | 0.633898 |
0a973367f894e5b454f1db0b866c3e470f386f86 | 3,644 | py | Python | suffdict_creation/test_suffdict.py | DanielleSucher/Nantucket | 2f7ce3de501a4e7f241fa96dc13ea639a8ee9030 | [
"MIT"
] | 17 | 2015-01-05T01:16:55.000Z | 2021-09-10T07:55:05.000Z | suffdict_creation/test_suffdict.py | DanielleSucher/Nantucket | 2f7ce3de501a4e7f241fa96dc13ea639a8ee9030 | [
"MIT"
] | null | null | null | suffdict_creation/test_suffdict.py | DanielleSucher/Nantucket | 2f7ce3de501a4e7f241fa96dc13ea639a8ee9030 | [
"MIT"
] | 3 | 2015-01-05T02:02:02.000Z | 2021-03-30T02:50:12.000Z | from __future__ import division
import sys
import os.path
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
import poetry
import re
from nltk.corpus import cmudict
d = cmudict.dict()
from nltk.corpus.util import LazyCorpusLoader
from nltk.corpus.reader import *
suffdict = La... | 31.413793 | 153 | 0.624863 |
2e8e8e03812937cc61d06be64eb1a0443ab4bc13 | 1,923 | py | Python | bokeh/models/ui.py | sdc50/bokeh | 4f0a77c96f0045d380e5e9edb606a9f3c7832d9f | [
"BSD-3-Clause"
] | null | null | null | bokeh/models/ui.py | sdc50/bokeh | 4f0a77c96f0045d380e5e9edb606a9f3c7832d9f | [
"BSD-3-Clause"
] | null | null | null | bokeh/models/ui.py | sdc50/bokeh | 4f0a77c96f0045d380e5e9edb606a9f3c7832d9f | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 35.611111 | 84 | 0.24857 |
975bf1b5feaaadf60c2b91d4d3f992e293d62bd0 | 20,307 | py | Python | tfx/orchestration/portable/execution_publish_utils_test.py | TimoKerr/tfx | 10d13d57eeac21514fed73118cb43464dada67f1 | [
"Apache-2.0"
] | 1 | 2021-05-10T10:41:06.000Z | 2021-05-10T10:41:06.000Z | tfx/orchestration/portable/execution_publish_utils_test.py | TimoKerr/tfx | 10d13d57eeac21514fed73118cb43464dada67f1 | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/portable/execution_publish_utils_test.py | TimoKerr/tfx | 10d13d57eeac21514fed73118cb43464dada67f1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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 required by applicable law or a... | 36.069272 | 88 | 0.611366 |
48636aae635e348194a8f4ca834c49c91ca8c767 | 2,271 | py | Python | tests/test_utils.py | GlorifiedStatistics/MoreDataframes | 147d5b8104d1cbd1cf2836220f43fb6c8ca099b7 | [
"MIT"
] | null | null | null | tests/test_utils.py | GlorifiedStatistics/MoreDataframes | 147d5b8104d1cbd1cf2836220f43fb6c8ca099b7 | [
"MIT"
] | null | null | null | tests/test_utils.py | GlorifiedStatistics/MoreDataframes | 147d5b8104d1cbd1cf2836220f43fb6c8ca099b7 | [
"MIT"
] | null | null | null | """
Unit tests for the mdfutils subpackage.
"""
import numpy as np
import pandas as pd
import pytest
from moredataframes.mdfutils import to_numpy
@pytest.mark.parametrize("array_like, expected", [
([1, 2, 3], np.array([[1, 2, 3]]).T),
([[1], [2], [3]], np.array([[1, 2, 3]]).T),
((1, 2, 3), np.array([[1, 2... | 37.229508 | 105 | 0.622193 |
8eddd9c0b7fc7a23a9efbd8c7f018a91351d717a | 6,190 | py | Python | cifar10_fc.py | bcrafton/ssdfa | 661f9059184fde6ba7ad1ca710c5b5a1954c5ea6 | [
"MIT"
] | 10 | 2019-01-23T17:07:59.000Z | 2021-07-13T10:18:10.000Z | cifar10_fc.py | bcrafton/ssdfa | 661f9059184fde6ba7ad1ca710c5b5a1954c5ea6 | [
"MIT"
] | 1 | 2019-07-30T00:55:58.000Z | 2019-09-17T13:31:48.000Z | cifar10_fc.py | bcrafton/ssdfa | 661f9059184fde6ba7ad1ca710c5b5a1954c5ea6 | [
"MIT"
] | 1 | 2019-07-28T17:28:30.000Z | 2019-07-28T17:28:30.000Z |
import argparse
import os
import sys
##############################################
parser = argparse.ArgumentParser()
parser.add_argument('--epochs', type=int, default=100)
parser.add_argument('--batch_size', type=int, default=64)
parser.add_argument('--lr', type=float, default=1e-4)
parser.add_argument('--eps', ty... | 31.74359 | 136 | 0.623102 |
6d6da93ab974d56ceaff459ca30af8bc77cfa719 | 56,531 | py | Python | grr/lib/config_lib.py | harmony-tech/grr | df77b6d426702ad66bb5e1396c5a8f7f39510fa7 | [
"Apache-2.0"
] | 2 | 2019-06-02T13:11:16.000Z | 2019-06-25T13:30:46.000Z | grr/lib/config_lib.py | harmony-tech/grr | df77b6d426702ad66bb5e1396c5a8f7f39510fa7 | [
"Apache-2.0"
] | null | null | null | grr/lib/config_lib.py | harmony-tech/grr | df77b6d426702ad66bb5e1396c5a8f7f39510fa7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""This is the GRR config management code.
This handles opening and parsing of config files.
"""
import collections
import ConfigParser
import copy
import errno
import importlib
import inspect
import os
import platform
import re
import StringIO
import sys
import pkg_resources
import yaml
imp... | 32.676879 | 91 | 0.669668 |
ebdaec559f5e4550187e1d2209c22e2179b0f8b7 | 25,272 | py | Python | concat/level1/typecheck/__init__.py | jmanuel1/concat | b8a982f0b07c4af4a8d30c8fab927a07a4068232 | [
"MIT"
] | 5 | 2020-11-27T23:34:29.000Z | 2022-03-08T16:37:19.000Z | concat/level1/typecheck/__init__.py | jmanuel1/concat | b8a982f0b07c4af4a8d30c8fab927a07a4068232 | [
"MIT"
] | 1 | 2020-06-03T22:43:36.000Z | 2020-06-03T22:45:42.000Z | concat/level1/typecheck/__init__.py | jmanuel1/concat | b8a982f0b07c4af4a8d30c8fab927a07a4068232 | [
"MIT"
] | null | null | null | """The Concat type checker.
The type inference algorithm is based on the one described in "Robert Kleffner:
A Foundation for Typed Concatenative Languages, April 2017."
"""
import builtins
import collections.abc
from typing import (
List,
Set,
Tuple,
Dict,
Union,
Optional,
Callable,
Se... | 40.050713 | 151 | 0.47982 |
7d59064ff114a74f8483124403b996a1bb616202 | 3,361 | py | Python | setup.py | robinvanemden/deepC | 766da2eded028288661a4815760a0d2956a99299 | [
"Apache-2.0"
] | null | null | null | setup.py | robinvanemden/deepC | 766da2eded028288661a4815760a0d2956a99299 | [
"Apache-2.0"
] | null | null | null | setup.py | robinvanemden/deepC | 766da2eded028288661a4815760a0d2956a99299 | [
"Apache-2.0"
] | null | null | null | # how to run this script: python setup.py bdist_wheel
# how to test install: python -m pip install ~/dnnc/master/deepC/dist/dnnc-0.1-py3-none-any.whl --root pip_install_test
import os, sys, glob
import shutil, errno, subprocess, multiprocessing
import setuptools
NAME='deepC'
VERSION=0.13
long_description = ""
with ... | 26.888 | 119 | 0.648021 |
8f1da17ad3024fdce80a59e1055de3fbdcb47bca | 1,854 | py | Python | shared/shared/util/filter.py | ostcar/openslides-datastore-service | 5b17e162c477e3d19b59b2dcfcf307538e5ce90b | [
"MIT"
] | null | null | null | shared/shared/util/filter.py | ostcar/openslides-datastore-service | 5b17e162c477e3d19b59b2dcfcf307538e5ce90b | [
"MIT"
] | null | null | null | shared/shared/util/filter.py | ostcar/openslides-datastore-service | 5b17e162c477e3d19b59b2dcfcf307538e5ce90b | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Any, List, Literal, Union
from shared.typing import Field
from .self_validating_dataclass import SelfValidatingDataclass
@dataclass
class FilterOperator(SelfValidatingDataclass):
field: Field
operator: Literal["=", "!=", "<", ">", ">=", "<="]
value: A... | 23.175 | 86 | 0.478964 |
6712dcbb62b93523e181a2431aae21e0770618b9 | 2,779 | py | Python | data/sys/envron.py | SirBob01/Centurion-Human-Evolution | f90ab4ade77328a9a4ec3479eeef61b4ef4cd4cf | [
"BSD-3-Clause"
] | 3 | 2019-09-19T07:56:22.000Z | 2020-09-29T18:15:15.000Z | data/sys/envron.py | SirBob01/Centurion-Human-Evolution | f90ab4ade77328a9a4ec3479eeef61b4ef4cd4cf | [
"BSD-3-Clause"
] | null | null | null | data/sys/envron.py | SirBob01/Centurion-Human-Evolution | f90ab4ade77328a9a4ec3479eeef61b4ef4cd4cf | [
"BSD-3-Clause"
] | 1 | 2021-09-10T08:55:12.000Z | 2021-09-10T08:55:12.000Z | ## Centurion;
## Copyright (c) Keith Leonardo, NitroSquare Gaming;
import random
import math
from jukebox import *
from resources import *
from constants import *
from pie.physics import *
from pie.color import *
class Star(AABB):
def __init__(self, x, y):
self.size = random.choice((3, 6))
AABB.__init__(self, x,... | 28.070707 | 135 | 0.667146 |
d8efd52557904ee272c168ad8363610ab207feff | 2,652 | py | Python | sherpa_client/api/plans/compute_plan_label_hint.py | kairntech/sherpa-client | cd259c87b7291eeec3f3ea025e368f2f069a06cd | [
"Apache-2.0"
] | null | null | null | sherpa_client/api/plans/compute_plan_label_hint.py | kairntech/sherpa-client | cd259c87b7291eeec3f3ea025e368f2f069a06cd | [
"Apache-2.0"
] | null | null | null | sherpa_client/api/plans/compute_plan_label_hint.py | kairntech/sherpa-client | cd259c87b7291eeec3f3ea025e368f2f069a06cd | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.generated_label_hint import GeneratedLabelHint
from ...models.input_label import InputLabel
from ...types import Response
def _get_kwargs(
project_name: str,
*,
client: Client,
json_body: InputLabel,
) ->... | 22.474576 | 105 | 0.652338 |
5009d189b47849a4e82d72cf2462cdfa202670f2 | 63,857 | py | Python | code/model.py | Thesis-02F/Style-Attn | 55f78de4858e395ebf9750a23923fd772600290f | [
"MIT"
] | null | null | null | code/model.py | Thesis-02F/Style-Attn | 55f78de4858e395ebf9750a23923fd772600290f | [
"MIT"
] | null | null | null | code/model.py | Thesis-02F/Style-Attn | 55f78de4858e395ebf9750a23923fd772600290f | [
"MIT"
] | null | null | null | '''
Based on
https://github.com/taoxugit/AttnGAN/blob/master/code/model.py
'''
import torch
import torch.nn as nn
import torch.nn.parallel
from torch.autograd import Variable
from torchvision import models
import torch.utils.model_zoo as model_zoo
import torch.nn.functional as F
import numpy as np
from torc... | 41.546519 | 178 | 0.563603 |
c4f45425433271a6326fa38373581d9d9e1c4aa9 | 1,500 | py | Python | setup.py | srinivasthuniki/alpha_vantage | 647458e2fd645c83e09dcb83cb346b19bdbf65fa | [
"MIT"
] | null | null | null | setup.py | srinivasthuniki/alpha_vantage | 647458e2fd645c83e09dcb83cb346b19bdbf65fa | [
"MIT"
] | null | null | null | setup.py | srinivasthuniki/alpha_vantage | 647458e2fd645c83e09dcb83cb346b19bdbf65fa | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
try:
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
except IOError:
long_description = 'Python module to get stock data from ... | 30.612245 | 83 | 0.616667 |
866e161af37b8feb95ed7e465e134a401854e795 | 1,347 | py | Python | main.py | PASTAplus/web-x | 7e27a354bbc3873f6e9ea9881e6d1f00b8d52a33 | [
"Apache-2.0"
] | null | null | null | main.py | PASTAplus/web-x | 7e27a354bbc3873f6e9ea9881e6d1f00b8d52a33 | [
"Apache-2.0"
] | 8 | 2022-01-31T20:03:12.000Z | 2022-03-28T02:42:07.000Z | main.py | PASTAplus/web-x | 7e27a354bbc3873f6e9ea9881e6d1f00b8d52a33 | [
"Apache-2.0"
] | 1 | 2022-03-18T14:36:42.000Z | 2022-03-18T14:36:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:Mod: main.py
:Synopsis:
:Author:
servilla
:Created:
5/14/21
"""
import logging
import os
import daiquiri
import fastapi
import fastapi_chameleon
import uvicorn
from starlette.staticfiles import StaticFiles
from views import about
from views import resourc... | 20.409091 | 72 | 0.733482 |
5a27ac358a0adba56d2e2565fe6c09bbb68ca2e5 | 2,596 | py | Python | caffe2/python/optimizer_test.py | shijieS/Caffe2 | f71695dcc27053e52b78f893344ea2ef2bd2da83 | [
"MIT"
] | null | null | null | caffe2/python/optimizer_test.py | shijieS/Caffe2 | f71695dcc27053e52b78f893344ea2ef2bd2da83 | [
"MIT"
] | null | null | null | caffe2/python/optimizer_test.py | shijieS/Caffe2 | f71695dcc27053e52b78f893344ea2ef2bd2da83 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from caffe2.python.optimizer import build_sgd, build_ftrl, build_adagrad, build_adam
from caffe2.python.optimizer_test_util import OptimizerTestBase
from caffe2.python.test_util import TestCase
from caffe2.pytho... | 41.870968 | 84 | 0.723421 |
8903eca4e41e202352a48d2c95195471bf7f9f61 | 1,258 | py | Python | google/ads/googleads/v4/enums/types/targeting_dimension.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/enums/types/targeting_dimension.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/enums/types/targeting_dimension.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 27.347826 | 74 | 0.685215 |
2b36f70d9422ce763cfe7e2710a253082d0ba005 | 6,251 | py | Python | movo_common/movo_ros/src/movo_action_clients/move_base_action_client.py | aaronsnoswell/kinova-movo | 380c7827a9cec12cc0f4f0cc19ce0b88775c6c51 | [
"BSD-3-Clause"
] | 37 | 2017-12-13T16:14:32.000Z | 2022-02-19T03:12:52.000Z | movo_common/movo_ros/src/movo_action_clients/move_base_action_client.py | aaronsnoswell/kinova-movo | 380c7827a9cec12cc0f4f0cc19ce0b88775c6c51 | [
"BSD-3-Clause"
] | 71 | 2018-01-17T20:17:03.000Z | 2022-03-23T19:48:45.000Z | movo_common/movo_ros/src/movo_action_clients/move_base_action_client.py | aaronsnoswell/kinova-movo | 380c7827a9cec12cc0f4f0cc19ce0b88775c6c51 | [
"BSD-3-Clause"
] | 32 | 2018-01-08T03:21:18.000Z | 2022-02-19T03:12:47.000Z | """--------------------------------------------------------------------
Copyright (c) 2017, Kinova Robotics inc.
All rights reserved.
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 mus... | 40.590909 | 100 | 0.640218 |
4f0129664fc2be0f47cca494bd23f94c997fc9d3 | 27,540 | py | Python | neural_rerendering.py | richardsfc/neural_rerendering_plus | f5b2bd2ebe7e9657e3584612818eb0d137714276 | [
"Apache-2.0"
] | 2 | 2020-06-09T01:48:13.000Z | 2021-07-06T11:53:51.000Z | neural_rerendering.py | richardsfc/neural_rerendering_plus | f5b2bd2ebe7e9657e3584612818eb0d137714276 | [
"Apache-2.0"
] | 7 | 2020-09-26T01:11:45.000Z | 2022-03-12T00:34:09.000Z | neural_rerendering.py | richardsfc/neural_rerendering_plus | f5b2bd2ebe7e9657e3584612818eb0d137714276 | [
"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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 44.064 | 105 | 0.712963 |
b376276fa2eb46f6cf00cb91b70c24af7056d797 | 1,158 | py | Python | bread/settings/testing.py | weblate/bread | e2af05ddabb1d267ccd7b35e646934e560594560 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-03-20T16:14:51.000Z | 2022-03-20T16:14:51.000Z | bread/settings/testing.py | weblate/bread | e2af05ddabb1d267ccd7b35e646934e560594560 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | bread/settings/testing.py | weblate/bread | e2af05ddabb1d267ccd7b35e646934e560594560 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | """This files contains only testing settings in order to easily run manage.py and tests. Never use them in production"""
import os
import tempfile
from bread.settings.required import * # noqa
SITE_ID = 1
BASE_DIR = tempfile.mkdtemp()
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = "/static/"
MEDIA_RO... | 26.930233 | 120 | 0.656304 |
851d52fddbf5388ba40e59af56b1215fdd2fdad0 | 36,981 | py | Python | dudley/test/python/fixme_run_generators.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | dudley/test/python/fixme_run_generators.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | dudley/test/python/fixme_run_generators.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 45.043849 | 175 | 0.665612 |
df75a5e1b0fb1c9ff66bb5f6efd77a1cc63bdf10 | 8,900 | py | Python | main.py | DavBatts/Exercise-01d-render-get_input-update | 8b304a374857cf9ad3db5f2e75ed64bd0b89be7d | [
"MIT"
] | null | null | null | main.py | DavBatts/Exercise-01d-render-get_input-update | 8b304a374857cf9ad3db5f2e75ed64bd0b89be7d | [
"MIT"
] | null | null | null | main.py | DavBatts/Exercise-01d-render-get_input-update | 8b304a374857cf9ad3db5f2e75ed64bd0b89be7d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
assert sys.version_info >= (3,9), "This script requires at least Python 3.9"
world = {
"uuid": "216ACD94-C70D-42CE-80F1-FA90A0D7F747",
"name": "Zork",
"creator": "Twine",
"creatorVersion": "2.3.14",
"schemaName": "Harlowe 3 to JSON",
"schemaVersion": "0.0.6",
"createdAtM... | 32.962963 | 308 | 0.524494 |
2d93b9b5ba5246343bf0805db18abbac86484e7a | 1,181 | py | Python | wagtail/tests/testapp/migrations/0041_secretpage.py | Nawarrr/wagtail | 4db71de5a2af19086026605be8fcb92c4be623aa | [
"BSD-3-Clause"
] | null | null | null | wagtail/tests/testapp/migrations/0041_secretpage.py | Nawarrr/wagtail | 4db71de5a2af19086026605be8fcb92c4be623aa | [
"BSD-3-Clause"
] | null | null | null | wagtail/tests/testapp/migrations/0041_secretpage.py | Nawarrr/wagtail | 4db71de5a2af19086026605be8fcb92c4be623aa | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.4 on 2018-12-17 18:16
from django.db import migrations, models
import django.db.models.deletion
import wagtail.tests.testapp.models
class Migration(migrations.Migration):
dependencies = [
("wagtailcore", "0041_group_collection_permissions_verbose_name_plural"),
("tests"... | 30.282051 | 86 | 0.504657 |
be2411e2f8a8260a60b34ea4e0809917900f0c01 | 3,481 | py | Python | api/analysis/interest_management/text_interest.py | SmartDuck9000/studnetwork-api | 2010e691ad189019451f3854c65f78a49d198383 | [
"MIT"
] | null | null | null | api/analysis/interest_management/text_interest.py | SmartDuck9000/studnetwork-api | 2010e691ad189019451f3854c65f78a49d198383 | [
"MIT"
] | null | null | null | api/analysis/interest_management/text_interest.py | SmartDuck9000/studnetwork-api | 2010e691ad189019451f3854c65f78a49d198383 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.metrics.pairwise import cosine_distances
from analysis.data_parsing.word_vectorizer import WordVectorizer
from analysis.data_parsing.word_data_parser import WordDataParser
class TextInterestManager:
"""used to get an interest-vector from text sources (word, te... | 39.11236 | 110 | 0.618213 |
5c8fd4eea595301802925b746a19d12dfecf154e | 1,538 | py | Python | Python diye Programming sekha 3rd/Page 125.py | mitul3737/My-Python-Programming-journey-from-Beginning-to-Data-Sciene-Machine-Learning-AI-Deep-Learning | ca2c15c597a64e5a7689ba3a44ce36a1c0828194 | [
"MIT"
] | null | null | null | Python diye Programming sekha 3rd/Page 125.py | mitul3737/My-Python-Programming-journey-from-Beginning-to-Data-Sciene-Machine-Learning-AI-Deep-Learning | ca2c15c597a64e5a7689ba3a44ce36a1c0828194 | [
"MIT"
] | null | null | null | Python diye Programming sekha 3rd/Page 125.py | mitul3737/My-Python-Programming-journey-from-Beginning-to-Data-Sciene-Machine-Learning-AI-Deep-Learning | ca2c15c597a64e5a7689ba3a44ce36a1c0828194 | [
"MIT"
] | 1 | 2021-05-02T20:30:29.000Z | 2021-05-02T20:30:29.000Z | """
Output:
searching 7
7
searching 8
None
"""
#Tree node class to know parents
class TreeNode:
def __init__(self, data):
self.data = data
self.parent = None
self.left = None
self.right = None
def __repr__(self):
return repr(self.data)
def add_left(self, node):
... | 19.468354 | 43 | 0.589727 |
2baea0f1de8d5aef0b4ffca75ceb2828a7d32d2f | 5,247 | py | Python | Exscript/util/buffer.py | sourcery-ai-bot/exscript | 86f7ae820fa3b7eb05da371ededfdb769e28fcda | [
"MIT"
] | null | null | null | Exscript/util/buffer.py | sourcery-ai-bot/exscript | 86f7ae820fa3b7eb05da371ededfdb769e28fcda | [
"MIT"
] | null | null | null | Exscript/util/buffer.py | sourcery-ai-bot/exscript | 86f7ae820fa3b7eb05da371ededfdb769e28fcda | [
"MIT"
] | null | null | null | #
# Copyright (C) 2010-2017 Samuel Abels
# The MIT License (MIT)
#
# 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,... | 32.79375 | 74 | 0.621307 |
6de7b416a27e976ea4ec4c274db6278c1396efbc | 3,063 | py | Python | bin/video_capture.py | MomsFriendlyRobotCompany/opencvutils | b88be39f37d11ff5dc53044cbe4421244d0c8010 | [
"MIT"
] | 1 | 2019-05-07T09:01:25.000Z | 2019-05-07T09:01:25.000Z | bin/video_capture.py | walchko/opencvutils | b88be39f37d11ff5dc53044cbe4421244d0c8010 | [
"MIT"
] | 2 | 2017-10-28T19:12:32.000Z | 2018-06-30T19:18:54.000Z | bin/video_capture.py | walchko/opencvutils | b88be39f37d11ff5dc53044cbe4421244d0c8010 | [
"MIT"
] | 1 | 2019-09-28T15:06:08.000Z | 2019-09-28T15:06:08.000Z | #!/usr/bin/env python
#
# Author: Kevin J. Walchko
# Date: 11 May 2014
# Version: 0.3
# -------------------------------
#
#
#
from __future__ import print_function
import cv2
import yaml
import argparse
from opencvutils import Camera
from opencvutils import SaveVideo
from opencvutils import __version__ as VERSION
from ... | 24.309524 | 111 | 0.625204 |
1d5c98ed48faf94156967b5210365e7718146350 | 9,885 | py | Python | docs/source/conf.py | chrisgilmerproj/brewing | fd8251e5bf34c20342034187fb30d9fffc723aa8 | [
"MIT"
] | 21 | 2016-08-16T17:34:17.000Z | 2021-05-09T13:44:48.000Z | docs/source/conf.py | chrisgilmerproj/brewing | fd8251e5bf34c20342034187fb30d9fffc723aa8 | [
"MIT"
] | 16 | 2016-11-16T17:07:12.000Z | 2020-12-16T18:11:49.000Z | docs/source/conf.py | chrisgilmerproj/brewing | fd8251e5bf34c20342034187fb30d9fffc723aa8 | [
"MIT"
] | 4 | 2016-08-16T16:40:49.000Z | 2019-10-31T01:53:00.000Z | # -*- coding: utf-8 -*-
#
# Brewday documentation build configuration file, created by
# sphinx-quickstart on Thu Mar 3 16:48:25 2016.
#
# 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.
#
# A... | 32.516447 | 84 | 0.703794 |
1a99fce3c62936e091fc4735a29d01433fed10a6 | 829 | py | Python | LcvSearch/manage.py | iahjc/spider | 72dc1e651ed2d242765e4791ec21cf94a0208126 | [
"MIT"
] | null | null | null | LcvSearch/manage.py | iahjc/spider | 72dc1e651ed2d242765e4791ec21cf94a0208126 | [
"MIT"
] | null | null | null | LcvSearch/manage.py | iahjc/spider | 72dc1e651ed2d242765e4791ec21cf94a0208126 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "LcvSearch.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensur... | 36.043478 | 78 | 0.626055 |
8e114e80842981614e81d03e7c72bd116283f205 | 12,519 | py | Python | trecento/tonality.py | wilsonify/music21-tools | 78cf5404c1bf5e4ab8b4d5b7b6c76e253d48c8ee | [
"BSD-3-Clause"
] | 29 | 2018-02-07T09:08:22.000Z | 2021-06-14T07:38:25.000Z | trecento/tonality.py | wilsonify/music21-tools | 78cf5404c1bf5e4ab8b4d5b7b6c76e253d48c8ee | [
"BSD-3-Clause"
] | 2 | 2018-05-09T16:45:11.000Z | 2019-08-07T20:23:03.000Z | trecento/tonality.py | wilsonify/music21-tools | 78cf5404c1bf5e4ab8b4d5b7b6c76e253d48c8ee | [
"BSD-3-Clause"
] | 12 | 2018-06-07T14:36:46.000Z | 2021-09-01T11:17:06.000Z | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: tonality.py
# Purpose: Methods for exploring tonality in the Trecento
#
# Authors: Michael Scott Cuthbert
#
# Copyright: Copyright © 2007, 2012 Michael Scott Cuthbert and the music21 Pro... | 34.871866 | 97 | 0.518811 |
f3588226066f7bdb2613fb7d7ce5e8f25534275b | 602 | py | Python | Miscellaneous/Statistics Python Programs/secondLowesrGrade.py | TausifAnsari/PyHub | f6c949dc6a3974f57d7d146708443d0ceeb4418f | [
"MIT"
] | 1 | 2020-11-09T14:13:45.000Z | 2020-11-09T14:13:45.000Z | Miscellaneous/Statistics Python Programs/secondLowesrGrade.py | TausifAnsari/PyHub | f6c949dc6a3974f57d7d146708443d0ceeb4418f | [
"MIT"
] | null | null | null | Miscellaneous/Statistics Python Programs/secondLowesrGrade.py | TausifAnsari/PyHub | f6c949dc6a3974f57d7d146708443d0ceeb4418f | [
"MIT"
] | null | null | null | if __name__ == '__main__':
arr=[]
res=[]
cnt=0
n=int(input())
if n>=2 and n<=5:
for _ in range(n):
name = input()
score = float(input())
arr.append([score, name])
arr.sort()
for i in range(1,n):
if arr[i-1][0]!=arr[i][0]:
res.... | 21.5 | 50 | 0.38206 |
1972c9abf193527da7d419b02010a07b6a484c75 | 7,570 | py | Python | _unittests/ut_onnxrt/test_onnx_inference.py | sdpython/mlprodic | 9367dacc91d35ec670c8a8a76708300a75bbc993 | [
"MIT"
] | 32 | 2018-03-04T23:33:30.000Z | 2022-03-10T19:15:06.000Z | _unittests/ut_onnxrt/test_onnx_inference.py | sdpython/mlprodic | 9367dacc91d35ec670c8a8a76708300a75bbc993 | [
"MIT"
] | 184 | 2017-11-30T14:10:35.000Z | 2022-02-21T08:29:31.000Z | _unittests/ut_onnxrt/test_onnx_inference.py | sdpython/mlprodic | 9367dacc91d35ec670c8a8a76708300a75bbc993 | [
"MIT"
] | 9 | 2019-07-24T13:18:00.000Z | 2022-03-07T04:08:07.000Z | """
@brief test log(time=2s)
"""
import unittest
from logging import getLogger
import numpy
from onnx import helper, TensorProto
from sklearn.datasets import load_iris
from sklearn.cluster import KMeans
from sklearn.model_selection import train_test_split
from pyquickhelper.pycode import ExtTestCase
from pyquickhe... | 45.329341 | 87 | 0.577675 |
e386f9e7deba406d711e41f968949bda46544ce2 | 1,157 | py | Python | napari/_qt/layers/qt_surface_layer.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/layers/qt_surface_layer.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/layers/qt_surface_layer.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | null | null | null | from .qt_image_base_layer import QtBaseImageControls
from qtpy.QtWidgets import QLabel
class QtSurfaceControls(QtBaseImageControls):
def __init__(self, layer):
super().__init__(layer)
# grid_layout created in QtLayerControls
# addWidget(widget, row, column, [row_span, column_span])
... | 46.28 | 73 | 0.690579 |
f79e6724c02ffb9084d12d85ba694c5cb02bd2d2 | 12,641 | py | Python | SimModel_Python_API/simmodel_swig/Release/SimTimeSeriesSchedule_Calendar_Configuration.py | EnEff-BIM/EnEffBIM-Framework | 6328d39b498dc4065a60b5cc9370b8c2a9a1cddf | [
"MIT"
] | 3 | 2016-05-30T15:12:16.000Z | 2022-03-22T08:11:13.000Z | SimModel_Python_API/simmodel_swig/Release/SimTimeSeriesSchedule_Calendar_Configuration.py | EnEff-BIM/EnEffBIM-Framework | 6328d39b498dc4065a60b5cc9370b8c2a9a1cddf | [
"MIT"
] | 21 | 2016-06-13T11:33:45.000Z | 2017-05-23T09:46:52.000Z | SimModel_Python_API/simmodel_swig/Release/SimTimeSeriesSchedule_Calendar_Configuration.py | EnEff-BIM/EnEffBIM-Framework | 6328d39b498dc4065a60b5cc9370b8c2a9a1cddf | [
"MIT"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
#
# 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 imp... | 45.308244 | 181 | 0.775492 |
b6a158aa870a982940cd1bc24463e5cedeb3d764 | 1,234 | py | Python | vispy/util/tests/test_logging.py | shjoshi/vispy | 2f3d169aa60c738467e766c59096f51570483d6f | [
"BSD-3-Clause"
] | null | null | null | vispy/util/tests/test_logging.py | shjoshi/vispy | 2f3d169aa60c738467e766c59096f51570483d6f | [
"BSD-3-Clause"
] | null | null | null | vispy/util/tests/test_logging.py | shjoshi/vispy | 2f3d169aa60c738467e766c59096f51570483d6f | [
"BSD-3-Clause"
] | null | null | null | from nose.tools import assert_equal
import logging
from vispy.util import logger, use_log_level
from vispy.testing import assert_in, assert_not_in
def test_logging():
"""Test logging context manager"""
ll = logger.level
with use_log_level('warning', print_msg=False):
assert_equal(logger.level, lo... | 30.85 | 71 | 0.678282 |
d283e2bda07691557be43326ff1ede74e607afa8 | 1,191 | py | Python | Simulador/consultas/migrations/0001_initial.py | silveriogabriel/Django-Blog | d47eb6c35ee1626720ab021db59e67ee9ed5c8cd | [
"MIT"
] | null | null | null | Simulador/consultas/migrations/0001_initial.py | silveriogabriel/Django-Blog | d47eb6c35ee1626720ab021db59e67ee9ed5c8cd | [
"MIT"
] | null | null | null | Simulador/consultas/migrations/0001_initial.py | silveriogabriel/Django-Blog | d47eb6c35ee1626720ab021db59e67ee9ed5c8cd | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-31 14:02
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... | 35.029412 | 120 | 0.5911 |
200bbdaf3a66c3051dd481266a94b82c7f3bc6d1 | 2,479 | py | Python | hooks/post_gen_project.py | westonkjones/dash-collapsible-tree | 9fbd43de228ea5ffa85e25b68db4576cb56284c1 | [
"MIT"
] | 1 | 2019-12-15T23:57:16.000Z | 2019-12-15T23:57:16.000Z | hooks/post_gen_project.py | westonkjones/dash-collapsible-tree | 9fbd43de228ea5ffa85e25b68db4576cb56284c1 | [
"MIT"
] | 5 | 2020-07-07T20:21:35.000Z | 2022-02-12T18:41:09.000Z | hooks/post_gen_project.py | westonkjones/dash-collapsible-tree | 9fbd43de228ea5ffa85e25b68db4576cb56284c1 | [
"MIT"
] | null | null | null | from __future__ import print_function
import shlex
import sys
import os
import subprocess
install_deps = '{{cookiecutter.install_dependencies}}'
project_shortname = '{{cookiecutter.project_shortname}}'
is_windows = sys.platform == 'win32'
if is_windows:
python_executable = os.path.join('venv', 'Scripts', 'pyth... | 26.655914 | 74 | 0.670432 |
aab53a8d8104c2b32bf93bbd084ac512aac5050d | 925 | py | Python | easylog/__init__.py | duguyue100/easylog | f2fe124dea6b3d556c2c5e0b0eaca4453629a490 | [
"MIT"
] | null | null | null | easylog/__init__.py | duguyue100/easylog | f2fe124dea6b3d556c2c5e0b0eaca4453629a490 | [
"MIT"
] | null | null | null | easylog/__init__.py | duguyue100/easylog | f2fe124dea6b3d556c2c5e0b0eaca4453629a490 | [
"MIT"
] | null | null | null | """Init file for easylog.
Author: Yuhuang Hu
Email : duguyue100@gmail.com
"""
from __future__ import print_function
import os
import sys
from os.path import join, isdir
try:
import telegram
from telegram.bot import Bot
TELEGRAM_STATUS = True
print ("[MESSAGE] The telegram service is switched on.")
ex... | 24.342105 | 64 | 0.738378 |
e5c6a22364b81f7dc4132be56faf1aa592a8538b | 24,190 | py | Python | src/quotes.py | EFFLUX110/Videogame-Quotes-API | 7104932c2d2fb695cce4e3a8522023dda4a1f632 | [
"MIT"
] | null | null | null | src/quotes.py | EFFLUX110/Videogame-Quotes-API | 7104932c2d2fb695cce4e3a8522023dda4a1f632 | [
"MIT"
] | null | null | null | src/quotes.py | EFFLUX110/Videogame-Quotes-API | 7104932c2d2fb695cce4e3a8522023dda4a1f632 | [
"MIT"
] | null | null | null | quote_dict = {
"quotes": [
{
"quote": "I'm Commander Shepard, and this is my favorite store on the Citadel!",
"game": "Mass Effect 2",
},
{
"quote": "It's time to kick ass and chew bubble gum...and I'm all outta gum.",
"game": "Duke Nukem",
... | 51.141649 | 704 | 0.558991 |
21ee4749e8310bc3b4477cd88b356b5d9fb9b8c2 | 43,957 | py | Python | webtest/__init__.py | arfrank/Fake-Twilio-Api | 3ed180d8ea81747f8afaba92af8f47e4397de480 | [
"Unlicense"
] | 6 | 2015-06-22T19:32:08.000Z | 2021-03-19T05:14:14.000Z | webtest/__init__.py | arfrank/Fake-Twilio-Api | 3ed180d8ea81747f8afaba92af8f47e4397de480 | [
"Unlicense"
] | null | null | null | webtest/__init__.py | arfrank/Fake-Twilio-Api | 3ed180d8ea81747f8afaba92af8f47e4397de480 | [
"Unlicense"
] | 2 | 2016-04-13T14:44:32.000Z | 2021-04-12T14:41:24.000Z | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
Routines for testing WSGI applications.
Most interesting is TestApp
"""
import sys
import random
import urllib
import urlparse
import mimetypes
i... | 33.503811 | 104 | 0.535 |
316365d9e067b920365946724eed03021759668e | 13,588 | py | Python | ResumeHelper.py | jberkow713/Multiple-Tic-Tac-Toe | f5dd3630adfd038f472f2752a262b0c276760985 | [
"MIT"
] | null | null | null | ResumeHelper.py | jberkow713/Multiple-Tic-Tac-Toe | f5dd3630adfd038f472f2752a262b0c276760985 | [
"MIT"
] | null | null | null | ResumeHelper.py | jberkow713/Multiple-Tic-Tac-Toe | f5dd3630adfd038f472f2752a262b0c276760985 | [
"MIT"
] | null | null | null | from NLPModels import *
from bs4 import BeautifulSoup
import requests
Leadership_Keywords = ['haired','Controlled','Coordinated','Executed','Headed','Operated','Orchestrated',\
'Organized','Oversaw','Planned','Produced','Programmed']
Creation_Keywords = ['Administered','Built','Charted','Created','Designed','Deve... | 79.461988 | 987 | 0.78113 |
07a44369518b5a682e308075c46d19ee78a554ef | 8,914 | py | Python | Code/impact evaluation/selection of NPIs.py | lucinezhong/controllers_ode_COVID | c67618a7c88b44044f3aeedb24a393f216d2ee26 | [
"MIT"
] | null | null | null | Code/impact evaluation/selection of NPIs.py | lucinezhong/controllers_ode_COVID | c67618a7c88b44044f3aeedb24a393f216d2ee26 | [
"MIT"
] | null | null | null | Code/impact evaluation/selection of NPIs.py | lucinezhong/controllers_ode_COVID | c67618a7c88b44044f3aeedb24a393f216d2ee26 | [
"MIT"
] | null | null | null | import sys
sys.path.append('Project')
from input_library import *
import Input
emergency_date=datetime.datetime.strptime('2020-03-13', '%Y-%m-%d')
start_date=datetime.datetime.strptime('2020-04-01', '%Y-%m-%d')
end_date = datetime.datetime.strptime('2021-02-20', '%Y-%m-%d')
training_date=datetime.datetime.strptime('20... | 54.353659 | 166 | 0.62744 |
1e3b8eaf27593f6988d4c1ccad3a1f40e3854122 | 666 | py | Python | beyondtheadmin/users/tests/test_urls.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | 1 | 2021-11-27T06:40:34.000Z | 2021-11-27T06:40:34.000Z | beyondtheadmin/users/tests/test_urls.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | 2 | 2021-05-13T04:50:50.000Z | 2022-02-28T21:06:24.000Z | beyondtheadmin/users/tests/test_urls.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | null | null | null | from django.urls import resolve, reverse
import pytest
from beyondtheadmin.users.models import User
pytestmark = pytest.mark.django_db
def test_detail(user: User):
assert (
reverse("users:detail", kwargs={"username": user.username})
== f"/users/{user.username}/"
)
assert resolve(f"/use... | 24.666667 | 74 | 0.677177 |
8256fdd9fc9bca8f056509e3cbdaf5cd24d83ee5 | 898 | py | Python | homeassistant/components/upnp/const.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/upnp/const.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 56 | 2020-08-03T07:30:54.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/upnp/const.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Constants for the IGD component."""
from datetime import timedelta
import logging
from homeassistant.const import TIME_SECONDS
LOGGER = logging.getLogger(__package__)
CONF_LOCAL_IP = "local_ip"
DOMAIN = "upnp"
DOMAIN_COORDINATORS = "coordinators"
DOMAIN_DEVICES = "devices"
DOMAIN_LOCAL_IP = "local_ip"
DOMAIN_CONF... | 27.212121 | 63 | 0.796214 |
842f9029aadd803c13c9c3cc7283bf6deabc7f54 | 4,188 | py | Python | InvenTree/barcodes/plugins/inventree_barcode.py | carlos-riquelme/InvenTree | 724dd2a9c82e4c10e14bd6aba8f48553b183fef9 | [
"MIT"
] | 656 | 2017-03-29T22:06:14.000Z | 2022-03-30T11:23:52.000Z | InvenTree/barcodes/plugins/inventree_barcode.py | carlos-riquelme/InvenTree | 724dd2a9c82e4c10e14bd6aba8f48553b183fef9 | [
"MIT"
] | 1,545 | 2017-04-10T23:26:04.000Z | 2022-03-31T18:32:10.000Z | InvenTree/barcodes/plugins/inventree_barcode.py | fablabbcn/InvenTree | 1d7ea7716cc96c6ffd151c822b01cd1fb5dcfecd | [
"MIT"
] | 196 | 2017-03-28T03:06:21.000Z | 2022-03-28T11:53:29.000Z | """
The InvenTreeBarcodePlugin validates barcodes generated by InvenTree itself.
It can be used as a template for developing third-party barcode plugins.
The data format is very simple, and maps directly to database objects,
via the "id" parameter.
Parsing an InvenTree barcode simply involves validating that the
refe... | 29.083333 | 85 | 0.506447 |
cf749da4b986faee4d64332da6da0a7471d3c6d3 | 14,210 | py | Python | apps/usuario/templatetags/utils.py | Ajerhy/proyectosipyet | 63e42e04272679eacc424a4cec51b92401eefa3f | [
"MIT"
] | null | null | null | apps/usuario/templatetags/utils.py | Ajerhy/proyectosipyet | 63e42e04272679eacc424a4cec51b92401eefa3f | [
"MIT"
] | null | null | null | apps/usuario/templatetags/utils.py | Ajerhy/proyectosipyet | 63e42e04272679eacc424a4cec51b92401eefa3f | [
"MIT"
] | null | null | null | import pytz
from django.utils.translation import ugettext_lazy as _
#Obtener Ip Usuario
def get_ip(request):
try:
x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR")
if x_forwarded_for:
ip = x_forwarded_for.split(",")[0]
else:
ip = request.META.get('REMOTE_ADD... | 29.118852 | 70 | 0.436031 |
002b3373437283b96db021b32f26280414ea2aaa | 68,887 | py | Python | databricks/koalas/strings.py | lopez-/koalas | aec9cb14439f0368c39aa90cfcbec3fe216c4478 | [
"Apache-2.0"
] | 1 | 2020-07-02T14:35:06.000Z | 2020-07-02T14:35:06.000Z | databricks/koalas/strings.py | VictorZan/koalas | 883d021392e2ea2f3adb2c71be4e9baa21001516 | [
"Apache-2.0"
] | null | null | null | databricks/koalas/strings.py | VictorZan/koalas | 883d021392e2ea2f3adb2c71be4e9baa21001516 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 30.081659 | 99 | 0.519024 |
d16d94af712147131731c472e2f2d6294c4b0195 | 6,002 | py | Python | volatility/framework/interfaces/automagic.py | doomedraven/volatility3 | 337d2ee01657fa2886da0d69d47b2daadc08df4e | [
"CNRI-Python",
"Linux-OpenIB"
] | null | null | null | volatility/framework/interfaces/automagic.py | doomedraven/volatility3 | 337d2ee01657fa2886da0d69d47b2daadc08df4e | [
"CNRI-Python",
"Linux-OpenIB"
] | null | null | null | volatility/framework/interfaces/automagic.py | doomedraven/volatility3 | 337d2ee01657fa2886da0d69d47b2daadc08df4e | [
"CNRI-Python",
"Linux-OpenIB"
] | null | null | null | # This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
"""Defines the automagic interfaces for populating the context before a plugin
runs.
Automagic objects attempt to automatically fill... | 48.403226 | 131 | 0.693935 |
caf75d3fceda966c9d954469c557a4130033e5e2 | 306 | py | Python | ems/urls.py | Tiwari1999/Innovaccer-Summer-Intern | d4d9824c230d11c66b2348caef61c2152bb0821e | [
"Apache-2.0"
] | null | null | null | ems/urls.py | Tiwari1999/Innovaccer-Summer-Intern | d4d9824c230d11c66b2348caef61c2152bb0821e | [
"Apache-2.0"
] | 6 | 2021-04-08T22:01:37.000Z | 2022-02-10T11:58:18.000Z | ems/urls.py | Tiwari1999/Innovaccer-summer-intern | d4d9824c230d11c66b2348caef61c2152bb0821e | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^check-in/', views.checkIn, name='checkIn'),
url(r'^check-out/', views.checkOut, name='checkOut'),
url(r'^register-host/', views.hostRegistration, name='hostRegistration'),
]
| 30.6 | 77 | 0.666667 |
c369413e29b933efd4a375cc49a5049e1650f7d5 | 3,525 | py | Python | cp2mqtt/__init__.py | hardwario/cp2mqtt | cbfc55719ea9197e8e2c481d6ab3135775e854f4 | [
"MIT"
] | 1 | 2019-02-10T07:59:54.000Z | 2019-02-10T07:59:54.000Z | cp2mqtt/__init__.py | hardwario/cp2mqtt | cbfc55719ea9197e8e2c481d6ab3135775e854f4 | [
"MIT"
] | null | null | null | cp2mqtt/__init__.py | hardwario/cp2mqtt | cbfc55719ea9197e8e2c481d6ab3135775e854f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import click
import json
import logging.config
import sys
import simplejson as json
import paho.mqtt.client
import zmq
from .config import load_config
__version__ = '@@VERSION@@'
@click.command()
@click.option('--config', '-c', 'config_file', type=click.File('r'), required=True, help='Configu... | 31.473214 | 111 | 0.624113 |
96991c56d650357c648bd6463645886c129d630b | 2,493 | py | Python | bulk.py | mrauer/highlights | a9e416047764488774cc8b2e0413c2e9d022ba5f | [
"MIT"
] | 2 | 2021-07-30T05:55:16.000Z | 2021-09-07T07:22:28.000Z | bulk.py | mrauer/highlights | a9e416047764488774cc8b2e0413c2e9d022ba5f | [
"MIT"
] | 2 | 2021-07-03T14:49:25.000Z | 2021-07-14T01:49:50.000Z | bulk.py | mrauer/highlights | a9e416047764488774cc8b2e0413c2e9d022ba5f | [
"MIT"
] | null | null | null | import argparse
import glob
import os
import subprocess
import sys
import time
HIGHTLIGHTS_SOURCE_PATH = os.environ['HIGHTLIGHTS_SOURCE_PATH']
HIGHTLIGHTS_OUTPUT_PATH = os.environ['HIGHTLIGHTS_OUTPUT_PATH']
RATIO = 15 # ratio space needed vs. disk.
DEFAULT_NUM_JOBS = 1
ERROR_CODE = 1
FFPROBE_CMD = 'ffprobe -v error -... | 33.689189 | 246 | 0.659045 |
ce2f4f8d9150887b19c7134e27a0abee98e3deb5 | 1,526 | py | Python | src/titiler/application/setup.py | robintw/titiler | 72e75387708322320bf39a80fbecc12223cdb5de | [
"MIT"
] | null | null | null | src/titiler/application/setup.py | robintw/titiler | 72e75387708322320bf39a80fbecc12223cdb5de | [
"MIT"
] | null | null | null | src/titiler/application/setup.py | robintw/titiler | 72e75387708322320bf39a80fbecc12223cdb5de | [
"MIT"
] | null | null | null | """Setup titiler-application."""
from setuptools import find_namespace_packages, setup
with open("README.md") as f:
long_description = f.read()
inst_reqs = [
"rio-cogeo>=2.2,<3.0",
"titiler.core",
"titiler.mosaic",
"starlette-cramjam>=0.1.0,<0.2",
"python-dotenv",
]
extra_reqs = {
"test":... | 31.142857 | 91 | 0.654653 |
41708431f1809d04bbd454283855fedd1b9a8fba | 56,199 | py | Python | restler/engine/core/requests.py | kokrui/restler-fuzzer | 2f48d6924f1a6d8b4acc4cadc246f80c7a793fdd | [
"MIT"
] | null | null | null | restler/engine/core/requests.py | kokrui/restler-fuzzer | 2f48d6924f1a6d8b4acc4cadc246f80c7a793fdd | [
"MIT"
] | null | null | null | restler/engine/core/requests.py | kokrui/restler-fuzzer | 2f48d6924f1a6d8b4acc4cadc246f80c7a793fdd | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
""" Primitives for definition and manipulation of restler request sequences. """
from __future__ import print_function
import time
import types
import random
random.seed(12345)
import itertools
import collections
import datetime
import copy
from... | 38.757931 | 157 | 0.625492 |
504c8fbe51732eca2aab64ff91d1d76d0c0aa182 | 764 | py | Python | setup.py | allonios/django-shorter | fd0216b73b080706aed38c9271ee1d629c8efaa5 | [
"MIT"
] | 6 | 2015-03-20T14:22:11.000Z | 2020-12-11T23:05:38.000Z | setup.py | allonios/django-shorter | fd0216b73b080706aed38c9271ee1d629c8efaa5 | [
"MIT"
] | 6 | 2020-06-05T17:48:23.000Z | 2021-06-10T17:29:19.000Z | setup.py | allonios/django-shorter | fd0216b73b080706aed38c9271ee1d629c8efaa5 | [
"MIT"
] | 11 | 2015-04-10T02:40:25.000Z | 2021-08-10T08:30:30.000Z | import os
from setuptools import find_packages, setup
import tinylinks
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ""
setup(
name="django-tinylinks",
version=tinylinks.__version__,
description=read("DESCRIPTION... | 24.645161 | 74 | 0.696335 |
02189948a2265f78106f09edb1573530dd3b896b | 7,131 | py | Python | tests/unit/language/ast/test_interface_type_definition.py | matt-koevort/tartiflette | 5777866b133d846ce4f8aa03f735fa81832896cd | [
"MIT"
] | 530 | 2019-06-04T11:45:36.000Z | 2022-03-31T09:29:56.000Z | tests/unit/language/ast/test_interface_type_definition.py | matt-koevort/tartiflette | 5777866b133d846ce4f8aa03f735fa81832896cd | [
"MIT"
] | 242 | 2019-06-04T11:53:08.000Z | 2022-03-28T07:06:27.000Z | tests/unit/language/ast/test_interface_type_definition.py | matt-koevort/tartiflette | 5777866b133d846ce4f8aa03f735fa81832896cd | [
"MIT"
] | 36 | 2019-06-21T06:40:27.000Z | 2021-11-04T13:11:16.000Z | import pytest
from tartiflette.language.ast import InterfaceTypeDefinitionNode
def test_interfacetypedefinitionnode__init__():
interface_type_definition_node = InterfaceTypeDefinitionNode(
name="interfaceTypeDefinitionName",
description="interfaceTypeDefinitionDescription",
directives="in... | 39.39779 | 79 | 0.628944 |
72e18ab788fa504c0089a55b56756f6ed1c7834f | 9,454 | py | Python | setup.py | josemauro/pathfinder | de26438f04b4b89d965b79646a36cf224d616936 | [
"MIT"
] | null | null | null | setup.py | josemauro/pathfinder | de26438f04b4b89d965b79646a36cf224d616936 | [
"MIT"
] | null | null | null | setup.py | josemauro/pathfinder | de26438f04b4b89d965b79646a36cf224d616936 | [
"MIT"
] | null | null | null | """Setup script.
Run "python3 setup.py --help-commands" to list all available commands and their
descriptions.
"""
import os
import shutil
import sys
from abc import abstractmethod
from pathlib import Path
from subprocess import CalledProcessError, call, check_call
from setuptools import Command, setup
from setuptool... | 29.917722 | 79 | 0.597313 |
e47729afc3621db2603d86f7b12d4c0728454ccf | 1,139 | py | Python | experiments/CUB_fewshot_cropped/Proto/ResNet-12_1-shot/test.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 43 | 2021-04-27T23:42:35.000Z | 2022-03-30T02:41:19.000Z | experiments/CUB_fewshot_cropped/Proto/ResNet-12_1-shot/test.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 7 | 2021-05-31T10:38:17.000Z | 2022-01-06T05:20:08.000Z | experiments/CUB_fewshot_cropped/Proto/ResNet-12_1-shot/test.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 7 | 2021-05-18T00:37:46.000Z | 2022-01-23T07:09:51.000Z | import sys
import os
import torch
import yaml
sys.path.append('../../../../')
from models.Proto import Proto
from utils import util
from trainers.eval import meta_test
with open('../../../../config.yml', 'r') as f:
temp = yaml.safe_load(f)
data_path = os.path.abspath(temp['data_path'])
test_path = os.path.join(d... | 30.783784 | 102 | 0.592625 |
bcacd376f6e86dd95fd122e3da9876049dbe874f | 7,846 | py | Python | kolibri/core/tasks/worker.py | kollivier/kolibri | 7312a5353021a22fc7b9701468e470cba5e1c62b | [
"MIT"
] | null | null | null | kolibri/core/tasks/worker.py | kollivier/kolibri | 7312a5353021a22fc7b9701468e470cba5e1c62b | [
"MIT"
] | null | null | null | kolibri/core/tasks/worker.py | kollivier/kolibri | 7312a5353021a22fc7b9701468e470cba5e1c62b | [
"MIT"
] | null | null | null | import logging
import traceback
from concurrent.futures import CancelledError
from concurrent.futures._base import CANCELLED
from concurrent.futures._base import CANCELLED_AND_NOTIFIED
from kolibri.core.tasks.compat import MULTIPROCESS
from kolibri.core.tasks.exceptions import UserCancelledError
from kolibri.core.tas... | 33.965368 | 98 | 0.646572 |
a7902ad442d5d93f25a44cf8055f4aff977ff675 | 16,166 | py | Python | devel/lib/python2.7/dist-packages/turtlebot_actions/msg/_FindFiducialActionResult.py | mynameisvinn/catkin_ws | d63eca698b91add14d18ae87d1bc884a36d460f6 | [
"MIT"
] | null | null | null | devel/lib/python2.7/dist-packages/turtlebot_actions/msg/_FindFiducialActionResult.py | mynameisvinn/catkin_ws | d63eca698b91add14d18ae87d1bc884a36d460f6 | [
"MIT"
] | null | null | null | devel/lib/python2.7/dist-packages/turtlebot_actions/msg/_FindFiducialActionResult.py | mynameisvinn/catkin_ws | d63eca698b91add14d18ae87d1bc884a36d460f6 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from turtlebot_actions/FindFiducialActionResult.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import geometry_msgs.msg
import turtlebot_actions.msg
import genpy
import a... | 39.237864 | 279 | 0.624335 |
cf70826e736a1a133af4d6a215ebb3b8482e035a | 23,373 | py | Python | msautotest/pymod/mstestlib.py | ashleysommer/MapServer | 7c65ac4256d94e0dcc2870ef6f7ccb549f3b0f70 | [
"Unlicense"
] | null | null | null | msautotest/pymod/mstestlib.py | ashleysommer/MapServer | 7c65ac4256d94e0dcc2870ef6f7ccb549f3b0f70 | [
"Unlicense"
] | null | null | null | msautotest/pymod/mstestlib.py | ashleysommer/MapServer | 7c65ac4256d94e0dcc2870ef6f7ccb549f3b0f70 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: MapServer
# Purpose: Test harnass for MapServer autotest.
# Author: Frank Warmerdam, warmerdam@pobox.com
#
###############################################################################
# Co... | 31.713704 | 188 | 0.531853 |
59794dc5abf0064c4641a16758668cbbf93a4941 | 258 | py | Python | Django_Annual/views.py | AbhijithGanesh/Password-Generator-Django | b87d8cc5007aa952542f0eab864ed53d500c8256 | [
"BSD-3-Clause"
] | null | null | null | Django_Annual/views.py | AbhijithGanesh/Password-Generator-Django | b87d8cc5007aa952542f0eab864ed53d500c8256 | [
"BSD-3-Clause"
] | 1 | 2021-10-11T05:10:01.000Z | 2021-10-11T05:20:21.000Z | Django_Annual/views.py | AbhijithGanesh/Password-Generator-Django | b87d8cc5007aa952542f0eab864ed53d500c8256 | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render, redirect
from django.http import HttpResponse
#from .forms import RegistrationForm
def Landing(request):
return render(request,'APP/Landing_Page.html')
def Land(request):
return render(request,'APP/index.html') | 25.8 | 50 | 0.782946 |
e322bb6d3582bb23db5d0d4878b8b609b5a21380 | 1,378 | py | Python | ooobuild/lo/frame/components.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/frame/components.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/frame/components.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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.809524 | 122 | 0.751089 |
4c1603b81f27941d5835c9124716383ab2b19c13 | 3,640 | py | Python | gamestate.py | randomprimate/game-playing-agent | d209ac7cfe5a74e3912c13316f69b1beb897e560 | [
"MIT"
] | null | null | null | gamestate.py | randomprimate/game-playing-agent | d209ac7cfe5a74e3912c13316f69b1beb897e560 | [
"MIT"
] | null | null | null | gamestate.py | randomprimate/game-playing-agent | d209ac7cfe5a74e3912c13316f69b1beb897e560 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from copy import deepcopy
import array_handling as ah
rows = 2
columns = 3
elements = [0] * columns
class GameState:
def __init__(self):
"""The GameState class constructor performs required
initializations when an instance is created.
Parameters
----------
... | 31.929825 | 92 | 0.573626 |
1c777d4996f2c07c935a93bdfa9808bb8ea28535 | 3,531 | py | Python | hybrid_search_engine/index.py | DomnenkoB/Hybrid-Search-Engine | 955e559f66723249d8810bb0ecbefd3de571dee0 | [
"Apache-2.0"
] | null | null | null | hybrid_search_engine/index.py | DomnenkoB/Hybrid-Search-Engine | 955e559f66723249d8810bb0ecbefd3de571dee0 | [
"Apache-2.0"
] | 2 | 2020-04-17T12:05:34.000Z | 2021-04-30T21:12:23.000Z | hybrid_search_engine/index.py | DomnenkoB/Hybrid-Search-Engine | 955e559f66723249d8810bb0ecbefd3de571dee0 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
import numpy as np
import pandas as pd
from nltk import word_tokenize
from hybrid_search_engine import nlp_engine
import hybrid_search_engine.utils.text_processing as processing
def build_index_from_df(df: pd.DataFrame, columns, id_column, filtering_columns=[], min_token_len=1,
... | 37.56383 | 124 | 0.609742 |
562f46f4a5167b216c5fe8254ae1db6910e75684 | 5,595 | py | Python | ee/clickhouse/queries/sessions/list.py | zegl/posthog | 62846fd565e9eb6ff299bb81dd3b91f219bd0eeb | [
"MIT"
] | null | null | null | ee/clickhouse/queries/sessions/list.py | zegl/posthog | 62846fd565e9eb6ff299bb81dd3b91f219bd0eeb | [
"MIT"
] | null | null | null | ee/clickhouse/queries/sessions/list.py | zegl/posthog | 62846fd565e9eb6ff299bb81dd3b91f219bd0eeb | [
"MIT"
] | null | null | null | from typing import Dict, List, Optional, Tuple
from ee.clickhouse.client import sync_execute
from ee.clickhouse.models.action import format_entity_filter
from ee.clickhouse.models.event import ClickhouseEventSerializer
from ee.clickhouse.models.person import get_persons_by_distinct_ids
from ee.clickhouse.models.proper... | 38.854167 | 119 | 0.626452 |
3aee13a719b25aec85821d242f2e17d091945f06 | 225 | py | Python | dcl/dcl/doctype/dcl_appraisal_entry/test_dcl_appraisal_entry.py | OlamideD/zutron | 42a3b360f7603fc4755d519904ecdb1712296ec2 | [
"MIT"
] | null | null | null | dcl/dcl/doctype/dcl_appraisal_entry/test_dcl_appraisal_entry.py | OlamideD/zutron | 42a3b360f7603fc4755d519904ecdb1712296ec2 | [
"MIT"
] | null | null | null | dcl/dcl/doctype/dcl_appraisal_entry/test_dcl_appraisal_entry.py | OlamideD/zutron | 42a3b360f7603fc4755d519904ecdb1712296ec2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, John Vincent Fiel and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestDCLAppraisalEntry(unittest.TestCase):
pass
| 20.454545 | 56 | 0.777778 |
8e0edbc5b263f4296ba79aad30f2f6b29b4fdc86 | 25,193 | py | Python | checks/prometheus_check.py | trilogy-group/kayako-dd-agent | 4a4cce9a367a6a522f3f4290819cbcd3ef637832 | [
"BSD-3-Clause"
] | null | null | null | checks/prometheus_check.py | trilogy-group/kayako-dd-agent | 4a4cce9a367a6a522f3f4290819cbcd3ef637832 | [
"BSD-3-Clause"
] | null | null | null | checks/prometheus_check.py | trilogy-group/kayako-dd-agent | 4a4cce9a367a6a522f3f4290819cbcd3ef637832 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import requests
from collections import defaultdict
from google.protobuf.internal.decoder import _DecodeVarint32 # pylint: disable=E0611,E0401
from checks import AgentCheck
from utils.prometheus import metrics_pb2
fr... | 47.986667 | 157 | 0.608463 |
e4a2ec7064ed655485f1df0c170e9999da034fe7 | 702 | py | Python | zoom/migrations/0003_metrics.py | ShrivardhanGoenka/ZoomTurnout | 1fc2e7848f02f9740f09d8c9023e8ebe36a2fea0 | [
"Unlicense",
"MIT"
] | 1 | 2022-02-09T16:52:25.000Z | 2022-02-09T16:52:25.000Z | zoom/migrations/0003_metrics.py | ShrivardhanGoenka/ZoomTurnout | 1fc2e7848f02f9740f09d8c9023e8ebe36a2fea0 | [
"Unlicense",
"MIT"
] | null | null | null | zoom/migrations/0003_metrics.py | ShrivardhanGoenka/ZoomTurnout | 1fc2e7848f02f9740f09d8c9023e8ebe36a2fea0 | [
"Unlicense",
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-05-18 16:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zoom', '0002_reportlog'),
]
operations = [
migrations.CreateModel(
name='Metrics',
fields=[
('id', m... | 29.25 | 117 | 0.57265 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.