hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796ae40c2cc38cd95107bf1a5c99ea6b4a524f59 | 7,041 | py | Python | spikeextractors/extractors/shybridextractors/shybridextractors.py | zekearneodo/spikeextractors | d30aa85e69d0331fffdb58a03a2bb628f93b405e | [
"MIT"
] | 145 | 2018-12-06T23:12:54.000Z | 2022-02-10T22:57:35.000Z | spikeextractors/extractors/shybridextractors/shybridextractors.py | zekearneodo/spikeextractors | d30aa85e69d0331fffdb58a03a2bb628f93b405e | [
"MIT"
] | 396 | 2018-11-26T11:46:30.000Z | 2022-01-04T07:27:47.000Z | spikeextractors/extractors/shybridextractors/shybridextractors.py | zekearneodo/spikeextractors | d30aa85e69d0331fffdb58a03a2bb628f93b405e | [
"MIT"
] | 67 | 2018-11-19T12:38:01.000Z | 2021-09-25T03:18:22.000Z | import os
from pathlib import Path
import numpy as np
from spikeextractors import RecordingExtractor, SortingExtractor
from spikeextractors.extractors.bindatrecordingextractor import BinDatRecordingExtractor
from spikeextractors.extraction_tools import save_to_probe_file, load_probe_file, check_get_unit_spike_train
tr... | 37.652406 | 129 | 0.653458 |
796ae45b2aff631b114d9a29d05a698adddace17 | 10,547 | py | Python | tests/test_x509.py | aalba6675/python-pkcs11 | 4e5782c306ca755b61e0c677c77b40c91d8b6ceb | [
"Unlicense"
] | null | null | null | tests/test_x509.py | aalba6675/python-pkcs11 | 4e5782c306ca755b61e0c677c77b40c91d8b6ceb | [
"Unlicense"
] | null | null | null | tests/test_x509.py | aalba6675/python-pkcs11 | 4e5782c306ca755b61e0c677c77b40c91d8b6ceb | [
"Unlicense"
] | 2 | 2019-06-15T17:43:43.000Z | 2021-02-25T03:35:38.000Z | """
X.509 Certificate Tests
"""
import base64
import subprocess
import datetime
from asn1crypto import pem
from asn1crypto.x509 import Certificate, TbsCertificate, Time, Name
from asn1crypto.keys import RSAPublicKey
from asn1crypto.csr import CertificationRequest, CertificationRequestInfo
import pkcs11
from pkcs11.u... | 39.208178 | 76 | 0.663317 |
796ae73194296ca66cfa9591d6f086c3e2f8abab | 17,838 | py | Python | tests/test_routes.py | ahbbzong/promotions | 4c9734b086345c8722b369a0b7ad0a83b4c7c8b0 | [
"Apache-2.0"
] | 3 | 2021-09-27T15:39:37.000Z | 2021-12-16T17:36:29.000Z | tests/test_routes.py | ahbbzong/promotions | 4c9734b086345c8722b369a0b7ad0a83b4c7c8b0 | [
"Apache-2.0"
] | 55 | 2021-09-29T15:17:38.000Z | 2021-12-08T21:20:24.000Z | tests/test_routes.py | ahbbzong/promotions | 4c9734b086345c8722b369a0b7ad0a83b4c7c8b0 | [
"Apache-2.0"
] | 3 | 2021-10-13T22:35:42.000Z | 2021-10-16T01:47:04.000Z | """
TestPromotion API Service Test Suite
Test cases can be run with the following:
nosetests -v --with-spec --spec-color
coverage report -m
"""
import os
import logging
import json
from unittest import TestCase
from unittest.mock import MagicMock, patch
from service import status # HTTP Status Codes
from service... | 43.935961 | 139 | 0.631965 |
796ae86e67116ae7ef9ca352cd8c01a4148460c8 | 62,464 | py | Python | python/ray/tests/test_placement_group.py | nikitavemuri/ray | 705248f4eef2f27acb0568dbbade73c211d01bc4 | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_placement_group.py | nikitavemuri/ray | 705248f4eef2f27acb0568dbbade73c211d01bc4 | [
"Apache-2.0"
] | 53 | 2021-06-19T07:06:06.000Z | 2022-03-26T07:05:27.000Z | python/ray/tests/test_placement_group.py | akern40/ray | d4f9d3620eecefeffc890ecf5193582bf667512e | [
"Apache-2.0"
] | null | null | null | import pytest
import os
import sys
import time
try:
import pytest_timeout
except ImportError:
pytest_timeout = None
import ray
from ray.test_utils import (generate_system_config_map, get_other_nodes,
kill_actor_and_wait_for_failure,
run_string_as_driver,... | 33.70966 | 79 | 0.634574 |
796ae98ac803b19a395993647e758131739f4be5 | 365 | py | Python | VergeCrawlr/pipelines.py | EwyBoy/INFO215 | d903551d716a28e4fdcda8d27918ec5b5e68177b | [
"MIT"
] | 1 | 2021-03-14T21:59:17.000Z | 2021-03-14T21:59:17.000Z | VergeCrawlr/pipelines.py | EwyBoy/INFO215 | d903551d716a28e4fdcda8d27918ec5b5e68177b | [
"MIT"
] | null | null | null | VergeCrawlr/pipelines.py | EwyBoy/INFO215 | d903551d716a28e4fdcda8d27918ec5b5e68177b | [
"MIT"
] | null | null | null | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
from itemadapter import ItemAdapter
class VergecrawlrPipeline:
def process_i... | 26.071429 | 66 | 0.769863 |
796aea86414dc0011671d75376f0b5cd73c70faf | 5,490 | py | Python | homeassistant/components/media_player/dunehd.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 2 | 2017-10-26T19:43:55.000Z | 2017-12-30T23:29:00.000Z | homeassistant/components/media_player/dunehd.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:29:36.000Z | 2022-03-12T00:59:48.000Z | homeassistant/components/media_player/dunehd.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 1 | 2020-01-09T12:36:16.000Z | 2020-01-09T12:36:16.000Z | """
DuneHD implementation of the media player.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/media_player.dunehd/
"""
import voluptuous as vol
from homeassistant.components.media_player import (
MediaPlayerDevice, PLATFORM_SCHEMA)
from homeassistant.c... | 31.734104 | 79 | 0.649362 |
796aeb4d50be4b60740f8d9e07a00786429dd7fd | 1,421 | py | Python | Hackerrank/Project Euler - Python/euler003.py | rishabhrkaushik/Hacktoberfest | 16388c284ea954f44a0aa86a85b9e592b3efecb3 | [
"MIT"
] | null | null | null | Hackerrank/Project Euler - Python/euler003.py | rishabhrkaushik/Hacktoberfest | 16388c284ea954f44a0aa86a85b9e592b3efecb3 | [
"MIT"
] | null | null | null | Hackerrank/Project Euler - Python/euler003.py | rishabhrkaushik/Hacktoberfest | 16388c284ea954f44a0aa86a85b9e592b3efecb3 | [
"MIT"
] | null | null | null | #!/bin/python3
"""
Author: Rishabh Kaushik
e-mail: rishabhrkaushik@gmail.com
website: https://rishabhrkaushik.github.io
Purpose: This is part of the series to the solution to Project Euler.
Problem Statement: https://www.hackerrank.com/contests/projecteuler/challenges/euler003/problem
"""
import ... | 26.314815 | 99 | 0.597467 |
796aeb7d842885a8907e2b5fc84fe020b3f13c34 | 2,219 | py | Python | Use_Cases/VPS_Popcorn_Production/Kubernetes/src/L3_PC_Evaluation.py | konsdt/KOARCH | 07c4d6b1030604eda1ef3fe674167a20eb2c905c | [
"Apache-2.0"
] | 4 | 2019-12-20T13:24:04.000Z | 2021-03-24T11:14:37.000Z | Use_Cases/VPS_Popcorn_Production/Kubernetes/src/L3_PC_Evaluation.py | konsdt/KOARCH | 07c4d6b1030604eda1ef3fe674167a20eb2c905c | [
"Apache-2.0"
] | null | null | null | Use_Cases/VPS_Popcorn_Production/Kubernetes/src/L3_PC_Evaluation.py | konsdt/KOARCH | 07c4d6b1030604eda1ef3fe674167a20eb2c905c | [
"Apache-2.0"
] | 7 | 2020-10-07T08:31:01.000Z | 2021-12-03T15:12:51.000Z | import os
from time import sleep
import traceback
import pandas as pd
from Use_Cases.VPS_Popcorn_Production.Kubernetes.src.classes.CognitionPC import CognitionPC
pd.set_option("display.max_columns", None)
pd.options.display.float_format = "{:.3f}".format
debugging = False
if debugging is True:
env_vars = {
... | 26.73494 | 107 | 0.608382 |
796aebb22110debbedea11e64aa45419f9d1b046 | 16,623 | py | Python | svjgenprod/fullsimrunners.py | tklijnsma/svjgenprod | 5be6954ecbb0b9e794d33fdb2ddadad8589a389c | [
"BSD-3-Clause"
] | null | null | null | svjgenprod/fullsimrunners.py | tklijnsma/svjgenprod | 5be6954ecbb0b9e794d33fdb2ddadad8589a389c | [
"BSD-3-Clause"
] | null | null | null | svjgenprod/fullsimrunners.py | tklijnsma/svjgenprod | 5be6954ecbb0b9e794d33fdb2ddadad8589a389c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os, shutil, sys, glob, subprocess, re, logging
import os.path as osp
from time import strftime
import svjgenprod
logger = logging.getLogger('root')
#____________________________________________________________________
class F... | 37.608597 | 147 | 0.644769 |
796aed8ab33752234e626c35b0af7460502e9011 | 5,636 | py | Python | execution/run_utils.py | gentlegiantJGC/xmastree2021 | a1eb09687b2c1bd93bffc898d8214b2017310f89 | [
"MIT"
] | null | null | null | execution/run_utils.py | gentlegiantJGC/xmastree2021 | a1eb09687b2c1bd93bffc898d8214b2017310f89 | [
"MIT"
] | null | null | null | execution/run_utils.py | gentlegiantJGC/xmastree2021 | a1eb09687b2c1bd93bffc898d8214b2017310f89 | [
"MIT"
] | null | null | null | # Written by gentlegiantJGC
from typing import Tuple, List, Optional, NamedTuple
import csv
import time
import neopixel
Color = Tuple[float, float, float]
Frame = List[Color]
Frames = List[Frame]
FrameTime = float
FrameTimes = List[FrameTime]
Sequence = NamedTuple("Sequence", [("frames", Frames), ("frame_times", Fra... | 37.324503 | 116 | 0.656139 |
796aee4e16ec3359a02dbf95af7a399997b6bb70 | 834 | py | Python | zeus/god/migrations/0002_client.py | nightwarrior-xxx/Zeus | 429fe0dcbdbcc4024d2d58a6d897108df1bbfffd | [
"MIT"
] | null | null | null | zeus/god/migrations/0002_client.py | nightwarrior-xxx/Zeus | 429fe0dcbdbcc4024d2d58a6d897108df1bbfffd | [
"MIT"
] | 4 | 2020-06-06T00:42:50.000Z | 2022-02-10T08:51:36.000Z | zeus/god/migrations/0002_client.py | nightwarrior-xxx/Zeus | 429fe0dcbdbcc4024d2d58a6d897108df1bbfffd | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-11-27 20:19
from django.db import migrations, models
import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
('god', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Client',
... | 32.076923 | 114 | 0.59952 |
796aeeedbfeb82cf8b0475197cc3abc88e9599c8 | 9,501 | py | Python | google/cloud/storage/hmac_key.py | yun-cn/python-storage | 475c1f946439dc9df9ea9809aabc2f7847f0f590 | [
"Apache-2.0"
] | null | null | null | google/cloud/storage/hmac_key.py | yun-cn/python-storage | 475c1f946439dc9df9ea9809aabc2f7847f0f590 | [
"Apache-2.0"
] | null | null | null | google/cloud/storage/hmac_key.py | yun-cn/python-storage | 475c1f946439dc9df9ea9809aabc2f7847f0f590 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.20678 | 85 | 0.621303 |
796aef50eb1a8cd1ffb9ee1b18708c777781017b | 325 | py | Python | run_tests.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 4 | 2021-03-15T16:51:27.000Z | 2021-07-25T16:47:00.000Z | run_tests.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 2 | 2021-02-25T21:13:30.000Z | 2021-05-03T14:49:41.000Z | run_tests.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 1 | 2021-03-02T00:06:55.000Z | 2021-03-02T00:06:55.000Z | from tests.test_adk_remote import RemoteTest
from tests.test_adk_local import LocalTest
import unittest
import os
if __name__ == "__main__":
if os.getenv('ALGORITHMIA_API_KEY', None) == None:
raise Exception("api key not provided, please export your ALGORITHMIA_API_KEY environment variable.")
unittest.m... | 40.625 | 109 | 0.775385 |
796aeff9b5f2cad05250390bf243705cfa2b5d98 | 19,957 | py | Python | SymbolExtractorAndRenamer/lldb/scripts/Python/prepare_binding_Python.py | Polidea/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 427 | 2018-05-29T14:21:02.000Z | 2022-03-16T03:17:54.000Z | SymbolExtractorAndRenamer/lldb/scripts/Python/prepare_binding_Python.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 25 | 2018-07-23T08:34:15.000Z | 2021-11-05T07:13:36.000Z | SymbolExtractorAndRenamer/lldb/scripts/Python/prepare_binding_Python.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 52 | 2018-07-19T19:57:32.000Z | 2022-03-11T16:05:38.000Z | """
The LLVM Compiler Infrastructure
This file is distributed under the University of Illinois Open Source
License. See LICENSE.TXT for details.
Python binding preparation script.
"""
# Python modules:
from __future__ import print_function
import logging
import os
import re
import shutil
import... | 36.417883 | 79 | 0.658365 |
796af16bffde6ce44c8d09d1064c719c900047d5 | 1,689 | py | Python | doc/examples/usersguide/quad.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | doc/examples/usersguide/quad.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | doc/examples/usersguide/quad.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | from __future__ import division
##############################################################################
#
# 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/... | 27.688525 | 78 | 0.68206 |
796af22781d2e3e132ca0068169f8e0e85c8578f | 219 | py | Python | for_test/mysite/login/models.py | isai129/CodeTask | bb4d6ee7f2a39424fddc939a792a0a78171ca580 | [
"MIT"
] | 1 | 2021-02-06T01:56:43.000Z | 2021-02-06T01:56:43.000Z | for_test/mysite/login/models.py | isai129/CodeTask | bb4d6ee7f2a39424fddc939a792a0a78171ca580 | [
"MIT"
] | null | null | null | for_test/mysite/login/models.py | isai129/CodeTask | bb4d6ee7f2a39424fddc939a792a0a78171ca580 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class UserInfo(models.Model): # 要继承这个类(固定写法)。
user = models.CharField(max_length=32)
pwd = models.CharField(max_length=32)
# 创建两个字段,最大长度32,类型是char
| 21.9 | 46 | 0.721461 |
796af2e78e5b16854ea939b655f3df7290faeae5 | 2,921 | py | Python | pythontutorials/books/CrackingCodes/Ch15/affineHacker.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 2 | 2017-04-20T02:57:19.000Z | 2018-10-12T20:15:47.000Z | pythontutorials/books/CrackingCodes/Ch15/affineHacker.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 8 | 2021-03-18T21:50:16.000Z | 2022-03-11T23:38:01.000Z | pythontutorials/books/CrackingCodes/Ch15/affineHacker.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 3 | 2018-08-30T20:30:50.000Z | 2022-01-18T13:40:51.000Z | """Affine Cipher Hacker
Implements a function that can hack an affine cipher encrypted message.
Attributes:
SILENT_MODE (bool): Specifies whether to print all key attempts.
Note:
* https://www.nostarch.com/crackingcodes/ (BSD Licensed)
"""
from pythontutorials.books.CrackingCodes.Ch14.affineCipher import d... | 32.820225 | 114 | 0.673742 |
796af33d08e462e269c8f0fcf194c24b92ad092d | 9,864 | py | Python | keystonemiddleware/openstackoid.py | BeyondTheClouds/keystonemiddleware | e9a2a83e56c83a0f62bab1355277bceb901fadd4 | [
"Apache-1.1"
] | null | null | null | keystonemiddleware/openstackoid.py | BeyondTheClouds/keystonemiddleware | e9a2a83e56c83a0f62bab1355277bceb901fadd4 | [
"Apache-1.1"
] | 1 | 2019-02-18T10:31:04.000Z | 2019-02-18T10:31:04.000Z | keystonemiddleware/openstackoid.py | BeyondTheClouds/keystonemiddleware | e9a2a83e56c83a0f62bab1355277bceb901fadd4 | [
"Apache-1.1"
] | 1 | 2019-02-07T16:08:55.000Z | 2019-02-07T16:08:55.000Z | # -*- coding: utf-8 -
# ____ ______ __ _ __
# / __ \___ ___ ___ / __/ /____ _____/ /_____ (_)__/ /
# / /_/ / _ \/ -_) _ \_\ \/ __/ _ `/ __/ '_/ _ \/ / _ /
# \____/ .__/\__/_//_/___/\__/\_,_/\__/_/\_\\___/_/\_,_/
# /_/
# Make your OpenStacks Collaborative
#
# Useful links:
... | 40.760331 | 239 | 0.703771 |
796af5b5e192ae6138b38a3c4dda3987fd5b7336 | 19,988 | py | Python | sdk/python/pulumi_aws/eks/cluster.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/eks/cluster.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/eks/cluster.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 60.024024 | 578 | 0.694867 |
796af5c0bfd8d8a62b33cc1243e28e07a576463d | 6,681 | py | Python | wal_e/worker/upload.py | paalkr/wal-e | ff6102a1d19cf0f683c7232f618dbe8d14e6e017 | [
"BSD-3-Clause"
] | 2 | 2018-11-02T09:20:08.000Z | 2019-02-21T23:12:42.000Z | wal_e/worker/upload.py | paalkr/wal-e | ff6102a1d19cf0f683c7232f618dbe8d14e6e017 | [
"BSD-3-Clause"
] | null | null | null | wal_e/worker/upload.py | paalkr/wal-e | ff6102a1d19cf0f683c7232f618dbe8d14e6e017 | [
"BSD-3-Clause"
] | 2 | 2019-02-22T16:03:02.000Z | 2019-11-18T15:28:19.000Z | import errno
import socket
import tempfile
import time
try:
import boto.exception
except ImportError:
boto = None
from wal_e import log_help
from wal_e import pipebuf
from wal_e import pipeline
from wal_e import storage
from wal_e.blobstore import get_blobstore
from wal_e.piper import PIPE
from wal_e.retries ... | 39.3 | 79 | 0.527017 |
796af5f0c9af0aa91e8b9c101ec42a40869ce13c | 5,609 | py | Python | vincent/colors.py | ahlusar1989/vincent | 95c60d62bdf21507e75cb2d1dc5e29d40fde8664 | [
"MIT"
] | 1,052 | 2015-01-03T16:17:37.000Z | 2022-01-31T22:29:18.000Z | vincent/colors.py | mikemsq/vincent | 95c60d62bdf21507e75cb2d1dc5e29d40fde8664 | [
"MIT"
] | 28 | 2015-01-26T03:26:37.000Z | 2018-11-30T12:06:31.000Z | vincent/colors.py | mikemsq/vincent | 95c60d62bdf21507e75cb2d1dc5e29d40fde8664 | [
"MIT"
] | 179 | 2015-01-05T06:27:17.000Z | 2022-02-08T05:52:29.000Z | # -*- coding: utf-8 -*-
'''
Vincent Color Brewer scales
-------------------
A home for color brewer scales for Vincent integration.
The origin specs were created by Cynthia Brewer: http://colorbrewer.org/
These were pulled from the awesome folks working on D3:
https://github.com/mbostock/d3/blob/master/lib/colorbr... | 57.824742 | 76 | 0.434302 |
796af6b09ee97fd940efb74670a1e16c73890fab | 3,583 | py | Python | networks/network.py | Abtiotm/DQN | a89d7fcb1235a01f1ea6d388bfeaca871ca94cc3 | [
"MIT"
] | 29 | 2017-03-30T08:17:01.000Z | 2021-03-15T17:11:51.000Z | networks/network.py | binderwang/deep-rl-tensorflow | b646c65de0e5e76036c03ea7a4cf71f5b714c34c | [
"MIT"
] | null | null | null | networks/network.py | binderwang/deep-rl-tensorflow | b646c65de0e5e76036c03ea7a4cf71f5b714c34c | [
"MIT"
] | 11 | 2016-12-17T11:50:12.000Z | 2021-08-23T18:09:30.000Z | import tensorflow as tf
from .layers import *
class Network(object):
def __init__(self, sess, name):
self.sess = sess
self.copy_op = None
self.name = name
self.var = {}
def build_output_ops(self, input_layer, network_output_type,
value_hidden_sizes, advantage_hidden_sizes, output_size,
... | 38.945652 | 91 | 0.684343 |
796af85a2de3a6114b7e31fbb647ed9b8a4eec01 | 2,072 | py | Python | vtex_creator_V1.py | Carpethop/Source2_scripts | 1a9681ccf335af01ba8d74e12551b8d74f944515 | [
"Apache-2.0"
] | 1 | 2022-02-17T14:30:55.000Z | 2022-02-17T14:30:55.000Z | vtex_creator_V1.py | Carpethop/Source2_scripts | 1a9681ccf335af01ba8d74e12551b8d74f944515 | [
"Apache-2.0"
] | null | null | null | vtex_creator_V1.py | Carpethop/Source2_scripts | 1a9681ccf335af01ba8d74e12551b8d74f944515 | [
"Apache-2.0"
] | null | null | null | import shutil
from pathlib import Path
input_dir = Path(input("Folder with textures: "))
output_dir = Path(input("Output folder: "))
material_path = Path(input("Material path prefix: "))
for file in filter(lambda p: p.suffix in {".tga", ".png",'.mks'}, input_dir.rglob("*")): # Scan all files in the directory ... | 43.166667 | 145 | 0.526062 |
796af9603de0231d18ce44e315687b0c20f190d6 | 1,766 | py | Python | advocates/migrations/0001_initial.py | srk12345/khanadvocates | 21ed6e9899236cf687da2be6958545030e533e91 | [
"BSD-3-Clause"
] | null | null | null | advocates/migrations/0001_initial.py | srk12345/khanadvocates | 21ed6e9899236cf687da2be6958545030e533e91 | [
"BSD-3-Clause"
] | null | null | null | advocates/migrations/0001_initial.py | srk12345/khanadvocates | 21ed6e9899236cf687da2be6958545030e533e91 | [
"BSD-3-Clause"
] | 2 | 2017-04-17T07:59:17.000Z | 2017-04-18T09:28:31.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Court',
fields=[
('id', models.AutoField(verbos... | 37.574468 | 154 | 0.549264 |
796af96d8678e6b48ad61bc0e18d965b1b3f1c66 | 8,073 | py | Python | neolith/irc.py | neolith-io/neolith | 9fbc6371f2811bf29c6bec81f21b4a0d25983cea | [
"MIT"
] | 1 | 2019-04-20T03:52:52.000Z | 2019-04-20T03:52:52.000Z | neolith/irc.py | neolith-io/neolith | 9fbc6371f2811bf29c6bec81f21b4a0d25983cea | [
"MIT"
] | null | null | null | neolith/irc.py | neolith-io/neolith | 9fbc6371f2811bf29c6bec81f21b4a0d25983cea | [
"MIT"
] | null | null | null | from neolith import settings
from neolith.protocol import Message, PostChat, ProtocolError, Sendable, Session, Transaction
from .constants import ERR, RPL
import asyncio
import base64
import logging
def escape(text):
# TODO: escape stuff
if ' ' in text:
return ':' + text
return text
class IRCS... | 42.046875 | 104 | 0.593088 |
796afa1be10451266e4dff1575756df7707b07df | 13,350 | py | Python | crankycoin/services/api_client.py | Rajatkalsotra/crankycoin | 41c7ac6226842fb867b5eaa554c3604e998507c2 | [
"MIT"
] | 162 | 2017-07-11T11:27:10.000Z | 2022-03-17T14:24:12.000Z | crankycoin/services/api_client.py | Rajatkalsotra/crankycoin | 41c7ac6226842fb867b5eaa554c3604e998507c2 | [
"MIT"
] | 14 | 2017-09-05T08:38:55.000Z | 2021-06-05T13:44:10.000Z | crankycoin/services/api_client.py | Rajatkalsotra/crankycoin | 41c7ac6226842fb867b5eaa554c3604e998507c2 | [
"MIT"
] | 63 | 2017-07-16T13:35:14.000Z | 2022-01-09T21:49:38.000Z | import json
import requests
from crankycoin import config, logger
from crankycoin.models.enums import MessageType
from crankycoin.models.transaction import Transaction
from crankycoin.models.block import BlockHeader
class ApiClient(object):
FULL_NODE_PORT = config['network']['full_node_port']
NODES_URL = co... | 42.246835 | 111 | 0.584195 |
796afa31a4e1c8138bcbbd77e033505126f6eadc | 6,541 | py | Python | lab5/graphics.py | fairay/ComputerGraphics | 7de165ec2dff6bb3834e15288073b13cf3f6cdb3 | [
"Unlicense"
] | null | null | null | lab5/graphics.py | fairay/ComputerGraphics | 7de165ec2dff6bb3834e15288073b13cf3f6cdb3 | [
"Unlicense"
] | null | null | null | lab5/graphics.py | fairay/ComputerGraphics | 7de165ec2dff6bb3834e15288073b13cf3f6cdb3 | [
"Unlicense"
] | null | null | null | from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt, QThread
from PyQt5.QtGui import QBrush, QPen, QColor
from math import *
from edge_func import *
EPS = 10e-3
def round_down(x):
return floor(x)
def round_up(x):
return round(x+0.5)
class MyScene(QtWidgets.QGraphicsScene):
edge_arr = ... | 32.063725 | 82 | 0.529736 |
796afaa8353fb653cf00ae32d8eb0dbdf2191021 | 1,855 | py | Python | src/chemical_roles/export/obo.py | bgyori/chemical-roles | 31a917e911075e3be7eea509e143d3ff48e942cc | [
"MIT"
] | 5 | 2021-02-05T01:27:53.000Z | 2021-07-12T15:47:08.000Z | src/chemical_roles/export/obo.py | bgyori/chemical-roles | 31a917e911075e3be7eea509e143d3ff48e942cc | [
"MIT"
] | 8 | 2019-10-10T13:02:18.000Z | 2020-05-11T18:41:56.000Z | src/chemical_roles/export/obo.py | bgyori/chemical-roles | 31a917e911075e3be7eea509e143d3ff48e942cc | [
"MIT"
] | 5 | 2020-06-07T13:11:34.000Z | 2021-07-12T14:24:01.000Z | # -*- coding: utf-8 -*-
"""Export to OBO."""
from typing import Iterable, Mapping, Optional, Tuple
from pyobo import Obo, Reference, Term, TypeDef
from tqdm import tqdm
from .utils import get_relations_df
__all__ = [
'get_obo',
]
def get_obo() -> Obo:
"""Get Chemical Roles as OBO."""
return Obo(
... | 29.919355 | 108 | 0.658221 |
796afaf7988fdde65eee605f457235ed1fcaaa59 | 4,389 | py | Python | xhistogram/test/test_chunking.py | xgcm/xhistogram | e01291bb2668611a1bf7bcfa6829d195331aa6dc | [
"MIT"
] | 62 | 2019-04-01T21:06:29.000Z | 2022-03-16T16:00:14.000Z | xhistogram/test/test_chunking.py | xgcm/xhistogram | e01291bb2668611a1bf7bcfa6829d195331aa6dc | [
"MIT"
] | 72 | 2019-04-09T04:16:15.000Z | 2022-02-25T16:44:52.000Z | xhistogram/test/test_chunking.py | xgcm/xhistogram | e01291bb2668611a1bf7bcfa6829d195331aa6dc | [
"MIT"
] | 15 | 2019-07-17T06:52:28.000Z | 2022-01-18T10:51:33.000Z | import numpy as np
import pytest
from .fixtures import example_dataarray
from ..xarray import histogram
@pytest.mark.parametrize("weights", [False, True])
@pytest.mark.parametrize("chunksize", [1, 2, 3, 10])
@pytest.mark.parametrize("shape", [(10,), (10, 4)])
def test_chunked_weights(chunksize, shape, weights):
... | 29.857143 | 82 | 0.614263 |
796afc182bed40dce52b47683e1857ac0c9dc52e | 1,751 | py | Python | generate.py | spongepad/multi-aspect-summary | 6a0545844571844d037444cd9eaf8d1840baf322 | [
"MIT"
] | null | null | null | generate.py | spongepad/multi-aspect-summary | 6a0545844571844d037444cd9eaf8d1840baf322 | [
"MIT"
] | null | null | null | generate.py | spongepad/multi-aspect-summary | 6a0545844571844d037444cd9eaf8d1840baf322 | [
"MIT"
] | null | null | null | import os
import fire
import pickle
import cleantext
import torch
from tqdm import trange
from data_utils.datasets import SummaryDataset
from models.bart import BART
from kobart import get_kobart_tokenizer
from transformers import BartForConditionalGeneration
BATCH_SIZE = 1
MAX_LEN = 140
LEN_PENALTY = 2.
BEAM_SIZE =... | 30.189655 | 80 | 0.67333 |
796afc74b17ec302f0565ed19c44fb16fe808789 | 20,074 | py | Python | baseclasses/testing/pyRegTest.py | yqliaohk/baseclasses | dac8fbaddeb2f67b031ffc38353cbe8334b9bd03 | [
"Apache-2.0"
] | 6 | 2019-04-18T00:50:08.000Z | 2022-01-11T20:33:44.000Z | baseclasses/testing/pyRegTest.py | yqliaohk/baseclasses | dac8fbaddeb2f67b031ffc38353cbe8334b9bd03 | [
"Apache-2.0"
] | 50 | 2019-10-04T16:18:24.000Z | 2022-03-15T22:50:35.000Z | baseclasses/testing/pyRegTest.py | yqliaohk/baseclasses | dac8fbaddeb2f67b031ffc38353cbe8334b9bd03 | [
"Apache-2.0"
] | 24 | 2019-07-03T10:35:40.000Z | 2021-07-22T14:52:20.000Z | try:
from mpi4py import MPI
except ImportError:
# parallel functions will throw errors
MPI = None
import numpy
import os
import sys
import json
from collections import deque
from contextlib import contextmanager
from ..utils import CaseInsensitiveDict, CaseInsensitiveSet, Error
def getTol(**kwargs):
"... | 35.40388 | 150 | 0.540251 |
796afdb8416aece0b4f53b8f772e94d0198b352a | 2,958 | py | Python | pysnmp-with-texts/DNOS-SFLOW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/DNOS-SFLOW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/DNOS-SFLOW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DNOS-SFLOW-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DNOS-SFLOW-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:52:06 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 113.769231 | 477 | 0.79378 |
796aff8670f079609312489a47d55706ea3f89c6 | 2,191 | py | Python | huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/model/update_membes_role_v4_response.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/model/update_membes_role_v4_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/model/update_membes_role_v4_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class UpdateMembesRoleV4Response(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map... | 26.719512 | 77 | 0.535372 |
796affd136e3c56f02bd0dd44953c621c95cdef5 | 4,142 | py | Python | modules/pagetable/uatg_pte_write_only_inst_pf.py | incoresemi/chromite_uatg_tests | ff3116407c16eef0e73a1f3527075efdb2a4eb14 | [
"BSD-3-Clause"
] | 3 | 2021-09-17T04:53:08.000Z | 2021-09-17T06:14:23.000Z | modules/pagetable/uatg_pte_write_only_inst_pf.py | incoresemi/chromite_uatg_tests | ff3116407c16eef0e73a1f3527075efdb2a4eb14 | [
"BSD-3-Clause"
] | 3 | 2022-01-04T06:52:50.000Z | 2022-02-09T13:25:29.000Z | modules/pagetable/uatg_pte_write_only_inst_pf.py | incoresemi/chromite_uatg_tests | ff3116407c16eef0e73a1f3527075efdb2a4eb14 | [
"BSD-3-Clause"
] | 2 | 2022-01-04T04:36:40.000Z | 2022-01-04T05:32:24.000Z | # see LICENSE.incore for details
import os
import re
from typing import Dict, Union, Any
from ruamel.yaml import YAML
from yapsy.IPlugin import IPlugin
from uatg.utils import paging_modes
class uatg_pte_write_only_inst_pf(IPlugin):
"""
the test is used to setup write only page and check the
beha... | 32.614173 | 98 | 0.430951 |
796affe04b8d24965c027946878a1bd40f63bb9f | 1,551 | py | Python | setup.py | banskt/ebmrPy | 7b8fdc7cd27e050f4ddaf2670136fa85e15d767f | [
"MIT"
] | null | null | null | setup.py | banskt/ebmrPy | 7b8fdc7cd27e050f4ddaf2670136fa85e15d767f | [
"MIT"
] | null | null | null | setup.py | banskt/ebmrPy | 7b8fdc7cd27e050f4ddaf2670136fa85e15d767f | [
"MIT"
] | null | null | null | import sys
import setuptools
from setuptools.command.bdist_egg import bdist_egg
sys.path.append('src')
from version import __version__
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
class bdist_egg_disabled(bdist_egg):
"""Disabled version of bdist_egg
Prevents setup.py ... | 33 | 108 | 0.624113 |
796b003b02c0f87be4bd9d7d0d92bc87a19a527b | 7,086 | py | Python | metal/models/support_request_api.py | displague/metal-python | 96e64e9ac41025d85ff6f61693165e29e1c366db | [
"MIT"
] | null | null | null | metal/models/support_request_api.py | displague/metal-python | 96e64e9ac41025d85ff6f61693165e29e1c366db | [
"MIT"
] | 3 | 2021-09-27T05:10:36.000Z | 2021-09-27T06:10:57.000Z | metal/models/support_request_api.py | displague/metal-python | 96e64e9ac41025d85ff6f61693165e29e1c366db | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Metal API
This is the API for Equinix Metal. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. The official API docs are hosted at <https://metal.equinix.com/dev... | 40.261364 | 312 | 0.613181 |
796b004f1bfff6eead480871332922518577ef43 | 3,694 | py | Python | word_mover_distance/model.py | hechmik/word_mover_distance | 567b9f4fec3e03ea8bacd65e96868f08cbbd476e | [
"MIT"
] | 6 | 2020-06-28T07:42:21.000Z | 2021-05-25T01:47:47.000Z | word_mover_distance/model.py | hechmik/word_mover_distance | 567b9f4fec3e03ea8bacd65e96868f08cbbd476e | [
"MIT"
] | null | null | null | word_mover_distance/model.py | hechmik/word_mover_distance | 567b9f4fec3e03ea8bacd65e96868f08cbbd476e | [
"MIT"
] | null | null | null | from typing import List
import logging
from gensim.corpora import Dictionary
import numpy as np
from pyemd import emd
def nbow(document, vocab_len, dictionary):
d = np.zeros(vocab_len, dtype=np.double)
nbow = dictionary.doc2bow(document) # Word frequencies.
doc_len = len(document)
for idx, freq in nb... | 38.479167 | 99 | 0.596643 |
796b00e6f2e047450f719cf81c09d4cfad4e93a5 | 3,721 | py | Python | lib/python3.4/site-packages/django_extensions/management/commands/validate_templates.py | levabd/smart4-portal | 740cae69ab16733fc26a81034640c2956edae014 | [
"MIT"
] | 1 | 2017-02-24T11:23:34.000Z | 2017-02-24T11:23:34.000Z | lib/django_extensions/management/commands/validate_templates.py | tsriggs1/ApparelWorkshop | c5100d534e95aebf3609d5ca25cb160a169e509f | [
"BSD-3-Clause"
] | 6 | 2020-06-05T18:44:19.000Z | 2022-01-13T00:48:56.000Z | lib/django_extensions/management/commands/validate_templates.py | tsriggs1/ApparelWorkshop | c5100d534e95aebf3609d5ca25cb160a169e509f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from django.core.management.base import BaseCommand, CommandError
from django.core.management.color import color_style
from django.template.loader import get_template
from django_extensions.compat import add_to_builtins_compat, get_template_setting
from django_extensions.management.u... | 41.808989 | 107 | 0.59097 |
796b01bdc2cead79341b10785e7b572017ba153c | 837 | py | Python | analytics/views.py | gogog22510/PCMortgage | 8abbbf59e3d37c6107e77ffd1ba01ac808d6d596 | [
"MIT"
] | null | null | null | analytics/views.py | gogog22510/PCMortgage | 8abbbf59e3d37c6107e77ffd1ba01ac808d6d596 | [
"MIT"
] | 3 | 2020-02-12T00:07:23.000Z | 2021-06-10T21:22:28.000Z | analytics/views.py | gogog22510/PCMortgage | 8abbbf59e3d37c6107e77ffd1ba01ac808d6d596 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib import auth
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from analytics import static_data as stdata
from analytics.change_event import ChangeEventSerializer
# Create your views her... | 31 | 56 | 0.792115 |
796b01f4572917abacae28d106381e5a723083b2 | 1,319 | py | Python | matrix/ops/util.py | wesselb/matrix | ba343d69945d7cbc67330d01a87eee363ce5d408 | [
"MIT"
] | 3 | 2021-07-30T17:38:08.000Z | 2021-11-21T04:41:40.000Z | matrix/ops/util.py | wesselb/matrix | ba343d69945d7cbc67330d01a87eee363ce5d408 | [
"MIT"
] | null | null | null | matrix/ops/util.py | wesselb/matrix | ba343d69945d7cbc67330d01a87eee363ce5d408 | [
"MIT"
] | null | null | null | import lab as B
from plum import Union, List, Dispatcher
from ..matrix import AbstractMatrix
__all__ = ["align_batch", "batch_ones"]
_dispatch = Dispatcher()
@_dispatch
def align_batch(*xs: Union[B.Numeric, AbstractMatrix]):
"""Align the batch dimension of matrices.
Args:
*xs (matrix): Matrices.
... | 26.38 | 85 | 0.670963 |
796b029abc43f7f8283822567433ded890624ff1 | 193 | py | Python | pyscript/odd_n_even.py | kanokkorn/python-sktch | c43012ba3cbca0d9161eff26e8ccc3e5d2cb3aab | [
"MIT"
] | null | null | null | pyscript/odd_n_even.py | kanokkorn/python-sktch | c43012ba3cbca0d9161eff26e8ccc3e5d2cb3aab | [
"MIT"
] | 12 | 2018-11-19T02:50:16.000Z | 2020-03-01T15:04:31.000Z | pyscript/odd_n_even.py | kanokkorn/python-sktch | c43012ba3cbca0d9161eff26e8ccc3e5d2cb3aab | [
"MIT"
] | null | null | null | def odd_even(x):
if (x % 2) == 0:
return print("This is even number")
return print("This is odd number")
if __name__ == "__main__":
odd_even(int(input("Enter number : ")))
| 24.125 | 43 | 0.595855 |
796b02e4604b47a62360443c54a71486a75d32c7 | 555 | py | Python | fnexchange/server/app.py | dnif-archive/fnExchange | d75431b37da3193447b919b4be2e0104266156f1 | [
"Apache-2.0"
] | 1 | 2017-07-19T22:13:54.000Z | 2017-07-19T22:13:54.000Z | fnexchange/server/app.py | dnif/fnExchange | d75431b37da3193447b919b4be2e0104266156f1 | [
"Apache-2.0"
] | 1 | 2021-03-25T21:27:21.000Z | 2021-03-25T21:27:21.000Z | fnexchange/server/app.py | dnif-archive/fnExchange | d75431b37da3193447b919b4be2e0104266156f1 | [
"Apache-2.0"
] | 1 | 2021-07-07T18:55:19.000Z | 2021-07-07T18:55:19.000Z | import tornado.ioloop
import tornado.web
from fnexchange.server.handlers import APIHandler
def get_app(port, app_settings, handlers_settings):
url_patterns = [
(r"/", APIHandler, handlers_settings[APIHandler]),
]
app = tornado.web.Application(url_patterns, **app_settings)
app.listen(port)
... | 27.75 | 64 | 0.733333 |
796b03dcedbd65d5c7d8aa7ffdc1791d33517e1b | 4,476 | py | Python | PyOpenGl/Practice_7/House.py | kirillzx/Geometry-and-Visualization- | 3cf3e47268eac7b2a389f6f18b1d2e3503e9d13a | [
"MIT"
] | null | null | null | PyOpenGl/Practice_7/House.py | kirillzx/Geometry-and-Visualization- | 3cf3e47268eac7b2a389f6f18b1d2e3503e9d13a | [
"MIT"
] | null | null | null | PyOpenGl/Practice_7/House.py | kirillzx/Geometry-and-Visualization- | 3cf3e47268eac7b2a389f6f18b1d2e3503e9d13a | [
"MIT"
] | null | null | null | from math import *
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
# Процедура инициализации
def init():
glEnable(GL_DEPTH_TEST)
glClearColor(1.0, 1.0, 1.0, 1.0) # Белый цвет для первоначальной закраски
gluOrtho2D(-1.0, 1.0, -1.0, 1.0) # Определяем границы рисования по горизонтал... | 22.268657 | 99 | 0.592046 |
796b05ca7c1a2abf44115a82017e374139ba78e5 | 3,437 | py | Python | grouptreedelete.py | ickyfeet/grouptreedelete | df3d600a352838e72149a1c8904a328ace1858c4 | [
"MIT"
] | null | null | null | grouptreedelete.py | ickyfeet/grouptreedelete | df3d600a352838e72149a1c8904a328ace1858c4 | [
"MIT"
] | null | null | null | grouptreedelete.py | ickyfeet/grouptreedelete | df3d600a352838e72149a1c8904a328ace1858c4 | [
"MIT"
] | null | null | null | import requests
import argparse
import json
def getchildgroups(parentgroup):
groupurl = f"{url}/api/Groups?$filter=ParentGroupId eq {parentgroup}"
parentrequest = requests.get(groupurl, headers=apiheaders)
childgroupstext = parentrequest.text
childrenparsed = json.loads(childgroupstext)
for i... | 23.067114 | 88 | 0.664533 |
796b06547b8b327fe74ad9a2e5f1b1c2ebbe869e | 91 | py | Python | etherpad/apps.py | Content-Tools-Team/djangoetherpad | 97c57cef4cfdb4ff96ad5277ca40e545a2f860ee | [
"MIT"
] | null | null | null | etherpad/apps.py | Content-Tools-Team/djangoetherpad | 97c57cef4cfdb4ff96ad5277ca40e545a2f860ee | [
"MIT"
] | 1 | 2018-06-04T07:19:37.000Z | 2018-06-12T07:43:21.000Z | etherpad/apps.py | Content-Tools-Team/djangoetherpad | 97c57cef4cfdb4ff96ad5277ca40e545a2f860ee | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class EtherpadConfig(AppConfig):
name = 'etherpad'
| 15.166667 | 33 | 0.758242 |
796b06ca3180f26606a16756b53b95ca123878e8 | 9,911 | py | Python | models/input_pipeline.py | Bartvelp/DeepMicrobes_clone | 97d59214061b0334f7608467c401868f0b4da681 | [
"Apache-2.0"
] | null | null | null | models/input_pipeline.py | Bartvelp/DeepMicrobes_clone | 97d59214061b0334f7608467c401868f0b4da681 | [
"Apache-2.0"
] | null | null | null | models/input_pipeline.py | Bartvelp/DeepMicrobes_clone | 97d59214061b0334f7608467c401868f0b4da681 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
def input_function_train_kmer(input_tfrec, repeat_count, batch_size, cpus):
"""Parses tfrecord and returns dataset for training/eval.
Args:
input_tfrec: Filenames of t... | 37.97318 | 97 | 0.634547 |
796b0938075d6a1f2841779b6320c9ea2053bbf5 | 2,796 | py | Python | donasi/tests.py | rafimuhammad01/donasi-covid-19-2 | eee8fb28ce492639d900923c985bbb5e0a8ec07f | [
"Unlicense"
] | null | null | null | donasi/tests.py | rafimuhammad01/donasi-covid-19-2 | eee8fb28ce492639d900923c985bbb5e0a8ec07f | [
"Unlicense"
] | null | null | null | donasi/tests.py | rafimuhammad01/donasi-covid-19-2 | eee8fb28ce492639d900923c985bbb5e0a8ec07f | [
"Unlicense"
] | null | null | null | from django.test import TestCase, Client
from django.core.files.images import ImageFile
from django.test import LiveServerTestCase, TestCase, tag
from django.urls import reverse
from selenium import webdriver
from django.contrib.auth.models import User
from .models import Donasi
# Create your tests here.
@tag('functio... | 41.117647 | 97 | 0.697067 |
796b0c3e8a7c22635f03cb2afe44a8742dadc803 | 5,329 | py | Python | lite/tests/unittest_py/op/test_squeeze_op.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | null | null | null | lite/tests/unittest_py/op/test_squeeze_op.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | null | null | null | lite/tests/unittest_py/op/test_squeeze_op.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle 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 appli... | 40.067669 | 125 | 0.61231 |
796b0d3fefdbae4c0939ec84736abbd00f28b45c | 1,502 | py | Python | Thesis@3.9.1/Lib/site-packages/django/contrib/postgres/aggregates/statistics.py | nverbois/TFE21-232 | 7113837b5263b5c508bfc6903cb6982b48aa7ee4 | [
"MIT"
] | null | null | null | Thesis@3.9.1/Lib/site-packages/django/contrib/postgres/aggregates/statistics.py | nverbois/TFE21-232 | 7113837b5263b5c508bfc6903cb6982b48aa7ee4 | [
"MIT"
] | null | null | null | Thesis@3.9.1/Lib/site-packages/django/contrib/postgres/aggregates/statistics.py | nverbois/TFE21-232 | 7113837b5263b5c508bfc6903cb6982b48aa7ee4 | [
"MIT"
] | null | null | null | from django.db.models import Aggregate, FloatField, IntegerField
__all__ = [
"CovarPop",
"Corr",
"RegrAvgX",
"RegrAvgY",
"RegrCount",
"RegrIntercept",
"RegrR2",
"RegrSlope",
"RegrSXX",
"RegrSXY",
"RegrSYY",
"StatAggregate",
]
class StatAggregate(Aggregate):
output_... | 19.763158 | 72 | 0.673103 |
796b0d91e11fe0797e0f9ecaa39c7dbe32344941 | 278 | py | Python | testfiles/AIMLtest1.py | Somnitec/thelastjobonearthbot | d2ed56a5a7d7740ef107949313658e896db65b81 | [
"MIT"
] | null | null | null | testfiles/AIMLtest1.py | Somnitec/thelastjobonearthbot | d2ed56a5a7d7740ef107949313658e896db65b81 | [
"MIT"
] | null | null | null | testfiles/AIMLtest1.py | Somnitec/thelastjobonearthbot | d2ed56a5a7d7740ef107949313658e896db65b81 | [
"MIT"
] | null | null | null | import aiml
# Create the kernel and learn AIML files
kernel = aiml.Kernel()
kernel.learn("std-startup.xml")
kernel.respond("load aiml b")
kernel.respond('test date')
# Press CTRL-C to break this loop
while True:
print( kernel.respond(raw_input("Enter your message >> ")))
| 23.166667 | 63 | 0.726619 |
796b0e71fa06b119daa897dedfa66d7fefaf49be | 284 | py | Python | double_single.py | firefirer1983/socket-programming | b91beac022198a8f3e4715a724f73d65d08cb512 | [
"Apache-2.0"
] | null | null | null | double_single.py | firefirer1983/socket-programming | b91beac022198a8f3e4715a724f73d65d08cb512 | [
"Apache-2.0"
] | null | null | null | double_single.py | firefirer1983/socket-programming | b91beac022198a8f3e4715a724f73d65d08cb512 | [
"Apache-2.0"
] | null | null | null | ary = [56, 78, 76, 3, 5, 76, 5, 56]
def xor_sum(mm):
ret = mm.pop()
while mm:
m = mm.pop()
ret ^= m
return ret
print(ary)
xsum = xor_sum(ary.copy())
print(xsum)
a1 = [a ^ xsum for a in ary]
print(a1)
d = [a1[i] + a for i, a in enumerate(ary)]
print(d)
| 14.947368 | 42 | 0.528169 |
796b1102ecd23d2d6e356275fefcfc9f101c38d4 | 5,996 | py | Python | src/datadog_api_client/v2/model/metric_tag_configuration.py | DataDog/datadog-api-client-python | de2fc57dbde9acf4b8c8eef94ac29911227a62a2 | [
"Apache-2.0"
] | 32 | 2021-01-07T15:09:56.000Z | 2022-01-30T05:49:23.000Z | src/datadog_api_client/v2/model/metric_tag_configuration.py | DataDog/datadog-api-client-python | de2fc57dbde9acf4b8c8eef94ac29911227a62a2 | [
"Apache-2.0"
] | 228 | 2020-09-03T14:03:54.000Z | 2022-03-31T20:16:12.000Z | src/datadog_api_client/v2/model/metric_tag_configuration.py | DataDog/datadog-api-client-python | de2fc57dbde9acf4b8c8eef94ac29911227a62a2 | [
"Apache-2.0"
] | 12 | 2020-09-15T21:36:03.000Z | 2022-03-31T17:13:17.000Z | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from datadog_api_client.v2.model_utils import ( # noqa: F401
ApiTypeError,
Mo... | 41.93007 | 112 | 0.608406 |
796b11603903060369141f5e62735c8c4e50994a | 2,478 | py | Python | NeuroEvolution/Chromosome.py | VIVelev/Flappy-AI | eb79e313308e582c4ddb506d089cbf059bd02364 | [
"MIT"
] | 3 | 2018-04-28T20:34:02.000Z | 2019-11-13T12:05:14.000Z | NeuroEvolution/Chromosome.py | VIVelev/Flappy-AI | eb79e313308e582c4ddb506d089cbf059bd02364 | [
"MIT"
] | 1 | 2018-05-02T17:15:49.000Z | 2018-05-02T17:15:49.000Z | NeuroEvolution/Chromosome.py | VIVelev/Flappy-AI | eb79e313308e582c4ddb506d089cbf059bd02364 | [
"MIT"
] | null | null | null | import numpy as np
import random as rnd
from .nn import NeuralNetwork
__all__ = [
"Chromosome",
]
class Chromosome(object):
def __init__(self, n_hidden_layers=1, n_nodes=[6], n_inputs=2, n_classes=2):
self.genotype = NeuralNetwork(
n_hidden_layers=n_hidden_layers,
n_nodes=n_nod... | 38.123077 | 106 | 0.59887 |
796b118dc53159f3932220871d00cb44abec3543 | 2,086 | py | Python | juriscraper/opinions/united_states/state/wash.py | umeboshi2/juriscraper | 16abceb3747947593841b1c2708de84dcc85c59d | [
"BSD-2-Clause"
] | null | null | null | juriscraper/opinions/united_states/state/wash.py | umeboshi2/juriscraper | 16abceb3747947593841b1c2708de84dcc85c59d | [
"BSD-2-Clause"
] | null | null | null | juriscraper/opinions/united_states/state/wash.py | umeboshi2/juriscraper | 16abceb3747947593841b1c2708de84dcc85c59d | [
"BSD-2-Clause"
] | 1 | 2021-03-03T00:03:16.000Z | 2021-03-03T00:03:16.000Z | from datetime import timedelta, date
from dateutil.rrule import rrule, MONTHLY
from juriscraper.OpinionSite import OpinionSite
from juriscraper.lib.string_utils import convert_date_string
class Site(OpinionSite):
def __init__(self, *args, **kwargs):
super(Site, self).__init__(*args, **kwargs)
sel... | 32.59375 | 100 | 0.602589 |
796b1198a4304ae0ca476d3bfadd1ecbedc064f0 | 1,750 | py | Python | soundgen.py | bharadwaj-raju/PySoundGen | 60f16503a96afb41b497b5b4fcd22c4869476300 | [
"MIT"
] | 1 | 2022-03-07T07:53:42.000Z | 2022-03-07T07:53:42.000Z | soundgen.py | bharadwaj-raju/PySoundGen | 60f16503a96afb41b497b5b4fcd22c4869476300 | [
"MIT"
] | null | null | null | soundgen.py | bharadwaj-raju/PySoundGen | 60f16503a96afb41b497b5b4fcd22c4869476300 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import math
import sys
import wave
import array
import subprocess as sp
from collections import namedtuple
# Usage: soundgen.py tones_file wav_output_file [--play]
Tone = namedtuple('Tone', 'duration freq amplitude')
tones_file = sys.argv[1]
wav_output_file = sys.argv[2]
tones = []
total_du... | 29.166667 | 137 | 0.710857 |
796b12f8a6025eec53a4e41bf19893d1956db6a2 | 155 | py | Python | merify/test_evm/global_test_params.py | MatrixAINetwork/SmartContractFormalVerification | 37b4e67a63283c91cf9e3b9c757260cdab420ba4 | [
"MIT"
] | 1 | 2019-06-05T19:00:38.000Z | 2019-06-05T19:00:38.000Z | merify/test_evm/global_test_params.py | MatrixAINetwork/SmartContractFormalVerification | 37b4e67a63283c91cf9e3b9c757260cdab420ba4 | [
"MIT"
] | null | null | null | merify/test_evm/global_test_params.py | MatrixAINetwork/SmartContractFormalVerification | 37b4e67a63283c91cf9e3b9c757260cdab420ba4 | [
"MIT"
] | null | null | null | PASS = 100
FAIL = 101
TIME_OUT = 102
UNKNOWN_INSTRUCTION = 103
EXCEPTION = 104
EMPTY_RESULT = 105
INCORRECT_GAS = 106
PICKLE_PATH = 'current_test.pickle'
| 15.5 | 35 | 0.767742 |
796b13e6c63d51def5a559c6a79836627fc25551 | 2,952 | py | Python | venv/Lib/site-packages/sklearn/linear_model/__init__.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | 2 | 2021-05-02T07:59:56.000Z | 2021-12-14T19:53:13.000Z | venv/Lib/site-packages/sklearn/linear_model/__init__.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | 7 | 2021-06-08T21:46:24.000Z | 2022-03-12T00:35:31.000Z | my_env/Lib/site-packages/sklearn/linear_model/__init__.py | obulrdy6881/Drowsinss | 61cb9281d7dd22aee282b517e2fbf500f0ff9935 | [
"MIT"
] | 1 | 2021-05-02T07:59:59.000Z | 2021-05-02T07:59:59.000Z | """
The :mod:`sklearn.linear_model` module implements a variety of linear models.
"""
# See http://scikit-learn.sourceforge.net/modules/sgd.html and
# http://scikit-learn.sourceforge.net/modules/linear_model.html for
# complete documentation.
from ._base import LinearRegression
from ._bayes import BayesianRi... | 36.444444 | 79 | 0.601287 |
796b156fe39edc5f67f1ab925f1959b616c9b45c | 3,224 | py | Python | examples_hscc2016/example_nonlinear.py | pettni/treeabstr | 53d1673c3725d508bf76aaed4e114dc53e55f8e0 | [
"Xnet",
"X11"
] | 2 | 2018-10-09T19:53:28.000Z | 2020-05-25T06:36:40.000Z | examples_hscc2016/example_nonlinear.py | pettni/mode-count | 53d1673c3725d508bf76aaed4e114dc53e55f8e0 | [
"Xnet",
"X11"
] | null | null | null | examples_hscc2016/example_nonlinear.py | pettni/mode-count | 53d1673c3725d508bf76aaed4e114dc53e55f8e0 | [
"Xnet",
"X11"
] | null | null | null | """
Example illustrating abstracting a 2-mode switched system, and mode-counting synthesis on the abstraction graph
"""
import cPickle as pickle
import sys
import numpy as np
sys.path.append('../')
from modecount import *
from make_integer import make_integer
from random_cycle import random_cycle
# Parameters
g = 9.... | 27.322034 | 111 | 0.641439 |
796b16410fba03061d8c00e137f5a5a695364c04 | 30,714 | py | Python | typhon/files/handlers/common.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/files/handlers/common.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/files/handlers/common.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | from collections import defaultdict
from copy import copy
from datetime import datetime
from functools import wraps
import glob
from inspect import signature, ismethod
import os
import pickle
import warnings
import netCDF4
import pandas as pd
import xarray as xr
import numpy as np
# The HDF4 file handler needs pyhdf,... | 32.57052 | 99 | 0.574982 |
796b1711f9c0aaae83b62a9b9b63fa34b89d6568 | 3,332 | py | Python | src/pyrtable/filterutils.py | vilarneto/pyrtable | 679a8174963ca5bd088526488a6fd7363b6afb52 | [
"MIT"
] | 6 | 2021-04-06T19:48:46.000Z | 2021-12-21T20:44:34.000Z | src/pyrtable/filterutils.py | vilarneto/pyrtable | 679a8174963ca5bd088526488a6fd7363b6afb52 | [
"MIT"
] | 6 | 2021-01-22T15:04:27.000Z | 2021-10-13T19:54:41.000Z | src/pyrtable/filterutils.py | vilarneto/pyrtable | 679a8174963ca5bd088526488a6fd7363b6afb52 | [
"MIT"
] | null | null | null | import re
from enum import Enum
def quote_column_name(column_name: str) -> str:
return '{%s}' % re.sub(r'[}\\]', lambda ch: '\\' + ch.group(0), column_name)
def quote_value(value) -> str:
import datetime
if isinstance(value, str):
return '"%s"' % re.sub(r'(["\\])', lambda ch: '\\' + ch.group(0)... | 33.656566 | 84 | 0.696579 |
796b17738e1003b950790fd67f32046637653c83 | 2,144 | py | Python | tests/test_images_health.py | locriandev/doozer | 375eafccc15aadfd18dc50061eccb9a917d31b0b | [
"Apache-2.0"
] | 16 | 2018-11-06T16:49:03.000Z | 2021-11-07T19:48:49.000Z | tests/test_images_health.py | locriandev/doozer | 375eafccc15aadfd18dc50061eccb9a917d31b0b | [
"Apache-2.0"
] | 479 | 2018-11-15T15:37:49.000Z | 2022-03-31T08:39:44.000Z | tests/test_images_health.py | locriandev/doozer | 375eafccc15aadfd18dc50061eccb9a917d31b0b | [
"Apache-2.0"
] | 38 | 2018-11-07T14:33:15.000Z | 2021-12-13T13:59:12.000Z | import unittest
from unittest.mock import MagicMock
from doozerlib.cli import images_health
def add_record(image, state, task_id=123, build_url='link', time=1617641142670, name='name'):
'''Helper function to set up data for querying'''
if image not in data:
data[image] = []
data[image].append([st... | 32.484848 | 94 | 0.710354 |
796b19082508565af3db03c1642063ee30886097 | 3,833 | py | Python | source/DSM/StructType.py | Leosocy/StructSlender | 9a25d53c9ac5924e683d9cc76a8a6326d64a4667 | [
"MIT"
] | 2 | 2017-10-25T15:16:33.000Z | 2017-11-08T14:41:48.000Z | source/DSM/StructType.py | Leosocy/StructSlender | 9a25d53c9ac5924e683d9cc76a8a6326d64a4667 | [
"MIT"
] | null | null | null | source/DSM/StructType.py | Leosocy/StructSlender | 9a25d53c9ac5924e683d9cc76a8a6326d64a4667 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Struct Type
valid or not / typedef or not / struct names
e.g.
typedef struct A
{
int a;
double b;
} T_TEST, *P_T_TEST;
Then StructType.valid = True, StructType.typedef = True, StructType.type = TYPEDEF_STRUCT_A_XXX_T
And StructType.names = [... | 32.760684 | 98 | 0.542917 |
796b19680ce5096e5a0997bdc16bb75acf4ca5cb | 8,677 | py | Python | tests/test_utils_conda.py | sthagen/cyclonedx-python | f944c9564d8dfa67f34c79501590fea182ab74cd | [
"Apache-2.0"
] | 1 | 2019-11-02T17:59:40.000Z | 2019-11-02T17:59:40.000Z | tests/test_utils_conda.py | sthagen/cyclonedx-python | f944c9564d8dfa67f34c79501590fea182ab74cd | [
"Apache-2.0"
] | null | null | null | tests/test_utils_conda.py | sthagen/cyclonedx-python | f944c9564d8dfa67f34c79501590fea182ab74cd | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# This file is part of CycloneDX Python Lib
#
# 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 applic... | 48.205556 | 119 | 0.663478 |
796b1bdb778efe5da26dcfcf9effb5b875abbd2c | 2,400 | py | Python | prensilia/parloma_demo_test1.py | parloma/Prensilia | e0292834b82e7046e4333ecdb0be78502fdf6dab | [
"Apache-2.0"
] | 1 | 2015-01-12T03:08:25.000Z | 2015-01-12T03:08:25.000Z | prensilia/parloma_demo_test1.py | parloma/Prensilia | e0292834b82e7046e4333ecdb0be78502fdf6dab | [
"Apache-2.0"
] | null | null | null | prensilia/parloma_demo_test1.py | parloma/Prensilia | e0292834b82e7046e4333ecdb0be78502fdf6dab | [
"Apache-2.0"
] | null | null | null | from cv2 import namedWindow, imshow, waitKey, cvtColor, COLOR_RGB2BGR
from hand_grabber import PyOpenNIHandGrabber
from pose_recognizer import PyPoseRecognizer
from my_fun import *
from sklearn.externals import joblib
from hand import *
import time
import socket
WIDTH = 640
HEIGHT = 480
USE_CPU = False
#clien... | 25.263158 | 69 | 0.575 |
796b1ccba1320b1dd7e02369eb1a2bf3c16a2a4f | 4,945 | py | Python | lib/taurus/qt/qtgui/display/demo/taurusleddemo.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | null | null | null | lib/taurus/qt/qtgui/display/demo/taurusleddemo.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | 1 | 2020-02-28T16:36:04.000Z | 2020-03-02T07:51:12.000Z | lib/taurus/qt/qtgui/display/demo/taurusleddemo.py | MikeFalowski/taurus | ef041bf35dd847caf08a7efbe072f4020d35522e | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of t... | 34.58042 | 83 | 0.626087 |
796b1da6376948c5c28de39cff214d41bc6f5bc4 | 256 | py | Python | manage.py | SanketDG/djurl | a36bdaefdfd152341f653e97bc50819815087235 | [
"MIT"
] | 16 | 2015-03-15T00:06:10.000Z | 2020-04-12T17:29:00.000Z | manage.py | SanketDG/djurl | a36bdaefdfd152341f653e97bc50819815087235 | [
"MIT"
] | 2 | 2015-02-13T15:36:26.000Z | 2017-02-18T20:05:26.000Z | manage.py | SanketDG/djurl | a36bdaefdfd152341f653e97bc50819815087235 | [
"MIT"
] | 7 | 2015-04-14T06:46:21.000Z | 2018-02-01T09:57:30.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "url_shortener.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23.272727 | 77 | 0.777344 |
796b1dc65f7c6d14a64eebeff8a47a45ed898361 | 379 | py | Python | faker/providers/phone_number/ru_RU/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 1 | 2022-02-16T23:14:19.000Z | 2022-02-16T23:14:19.000Z | faker/providers/phone_number/ru_RU/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 33 | 2020-12-09T16:49:15.000Z | 2022-01-04T22:03:10.000Z | faker/providers/phone_number/ru_RU/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 3 | 2022-02-07T18:18:54.000Z | 2022-03-11T22:09:01.000Z | from .. import Provider as PhoneNumberProvider
class Provider(PhoneNumberProvider):
formats = (
"+7 ### ### ####",
"+7 ### ### ## ##",
"+7 (###) ###-##-##",
"+7 (###) ###-####",
"+7##########",
"8 ### ### ####",
"8 ### ### ## ##",
"8 (###) ###-##-##"... | 22.294118 | 46 | 0.23219 |
796b1defeba2b6ab7b3d141633921c32d982de33 | 333 | py | Python | mmcv/__init__.py | XinYangDong/mmcv-0.2.10 | 527388ea7c5daf7149a88b3dc833373d5a5fb850 | [
"Apache-2.0"
] | 54 | 2021-11-05T02:15:15.000Z | 2022-03-23T13:40:43.000Z | mmcv/__init__.py | innerlee/mmcv | 12f065ac516c476720bc946bdc7343ae234fa3eb | [
"Apache-2.0"
] | 8 | 2019-06-13T06:00:08.000Z | 2021-07-24T05:25:33.000Z | mmcv/__init__.py | innerlee/mmcv | 12f065ac516c476720bc946bdc7343ae234fa3eb | [
"Apache-2.0"
] | 6 | 2019-07-30T06:36:27.000Z | 2021-06-03T11:57:36.000Z | # flake8: noqa
from .arraymisc import *
from .utils import *
from .fileio import *
from .opencv_info import *
from .image import *
from .video import *
from .visualization import *
from .version import __version__
# The following modules are not imported to this level, so mmcv may be used
# without PyTorch.
# - runner
... | 23.785714 | 75 | 0.747748 |
796b1eab5bda63c5766b1f2d46dbcd99e4d581a4 | 1,148 | py | Python | aio_py_github/core/github_objects/contents.py | panhaoyu/aio_py_github | 689d21f11def75cbf12fb344a0bfb8822e65916f | [
"MIT"
] | null | null | null | aio_py_github/core/github_objects/contents.py | panhaoyu/aio_py_github | 689d21f11def75cbf12fb344a0bfb8822e65916f | [
"MIT"
] | null | null | null | aio_py_github/core/github_objects/contents.py | panhaoyu/aio_py_github | 689d21f11def75cbf12fb344a0bfb8822e65916f | [
"MIT"
] | null | null | null | from core.utils.requester import Requester as _Requester
from .github_object import GithubObject as _GithubObject
from .github_object import NotSet as _NotSet
from .repository import Repository
class Content(_GithubObject):
def __init__(self, requester: _Requester, repository: Repository, path):
super(Con... | 34.787879 | 83 | 0.665505 |
796b1f39cc204a6ae8bc217caf55d82302ffbeac | 8,254 | py | Python | ignite/tests/common.py | remicalixte/integrations-core | b115e18c52820fe1a92495f538fdc14ddf83cfe1 | [
"BSD-3-Clause"
] | 1 | 2021-03-24T13:00:14.000Z | 2021-03-24T13:00:14.000Z | ignite/tests/common.py | remicalixte/integrations-core | b115e18c52820fe1a92495f538fdc14ddf83cfe1 | [
"BSD-3-Clause"
] | null | null | null | ignite/tests/common.py | remicalixte/integrations-core | b115e18c52820fe1a92495f538fdc14ddf83cfe1 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
GAUGES = [
'jvm.thread_count',
'jvm.gc.survivor_size',
'jvm.heap_memory_committed',
'jvm.non_heap_memory_committed',
'jvm.buffer_pool.direct.count',
'jvm.cpu_load.process',
'jvm.non_... | 36.043668 | 59 | 0.732251 |
796b1f4ae33e92492e456ab42484fbcc17d27177 | 2,257 | py | Python | servicecatalog_puppet/workflow/lambda_invocations/invoke_lambda_task.py | richardmilnerwatts/aws-service-catalog-puppet | cd866860073b0e43722cc941bacd38df4e84f7a1 | [
"Apache-2.0"
] | 66 | 2019-04-23T12:10:27.000Z | 2022-03-31T19:47:09.000Z | servicecatalog_puppet/workflow/lambda_invocations/invoke_lambda_task.py | richardmilnerwatts/aws-service-catalog-puppet | cd866860073b0e43722cc941bacd38df4e84f7a1 | [
"Apache-2.0"
] | 283 | 2019-04-18T22:21:20.000Z | 2022-03-31T10:04:42.000Z | servicecatalog_puppet/workflow/lambda_invocations/invoke_lambda_task.py | richardmilnerwatts/aws-service-catalog-puppet | cd866860073b0e43722cc941bacd38df4e84f7a1 | [
"Apache-2.0"
] | 47 | 2019-05-14T12:45:57.000Z | 2022-03-25T17:54:22.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import luigi
from servicecatalog_puppet.workflow import dependency
from servicecatalog_puppet.workflow.lambda_invocations import do_invoke_lambda_task
from servicecatalog_puppet.workflow.lambda_invocation... | 33.686567 | 83 | 0.720425 |
796b1fa6f0e473d8e5fa07adb8b5dcdff936fb0e | 3,532 | py | Python | hmkit/autoapi/commands/gasflap_state.py | highmobility/hmkit-python | 2ac06ed021b57014f5290eaece19a9399d52df48 | [
"MIT"
] | 1 | 2021-08-01T20:35:57.000Z | 2021-08-01T20:35:57.000Z | hmkit/autoapi/commands/gasflap_state.py | highmobility/hmkit-python | 2ac06ed021b57014f5290eaece19a9399d52df48 | [
"MIT"
] | null | null | null | hmkit/autoapi/commands/gasflap_state.py | highmobility/hmkit-python | 2ac06ed021b57014f5290eaece19a9399d52df48 | [
"MIT"
] | null | null | null | """
The MIT License
Copyright (c) 2014- High-Mobility GmbH (https://high-mobility.com)
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... | 32.109091 | 83 | 0.663364 |
796b2017c0f3870954ff07decd592d0fd157d363 | 124 | py | Python | skeleton/core.py | miketwo/python-skeleton | 991097ca87a60d854be3e49ad7528e7c8c58c158 | [
"MIT"
] | 1 | 2021-09-14T17:49:39.000Z | 2021-09-14T17:49:39.000Z | skeleton/core.py | miketwo/python-skeleton | 991097ca87a60d854be3e49ad7528e7c8c58c158 | [
"MIT"
] | 1 | 2021-06-25T15:46:44.000Z | 2021-06-25T15:46:44.000Z | skeleton/core.py | miketwo/python-skeleton | 991097ca87a60d854be3e49ad7528e7c8c58c158 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def hello():
print("Hello World")
return True
def add_two_things(a, b):
return a+b
| 10.333333 | 25 | 0.564516 |
796b2058495241cc6bceebb8644fe6b6b4d5a50d | 594 | py | Python | qcf/conf.py | synw/django-qcf | ce21ed515a249e702da67c16e28c85b1165da1f1 | [
"MIT"
] | 2 | 2017-01-20T22:26:24.000Z | 2018-01-06T02:52:17.000Z | qcf/conf.py | synw/django-qcf | ce21ed515a249e702da67c16e28c85b1165da1f1 | [
"MIT"
] | null | null | null | qcf/conf.py | synw/django-qcf | ce21ed515a249e702da67c16e28c85b1165da1f1 | [
"MIT"
] | 3 | 2016-05-22T12:36:53.000Z | 2018-01-11T14:28:50.000Z | # -*- coding: utf-8 -*-
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse_lazy
SAVE_TO_DB = getattr(settings, 'QCF_SAVE_TO_DB', True)
TEMPLATES = getattr(settings, 'QCF_TEMPLATES', "default")
RECIPIENTS_LIST = getattr(settings, 'QCF_RECIPIENTS_L... | 31.263158 | 73 | 0.712121 |
796b21532f89f9c276ad4cd57ff6ddddb7f1db5b | 9,506 | py | Python | src/traffic_count/detector/utils/loss.py | wyf94/TrafficCount | d16398fb9afbc5dcfcc36face7c3ce72be2a1211 | [
"Apache-2.0"
] | 1 | 2021-05-27T08:31:32.000Z | 2021-05-27T08:31:32.000Z | src/traffic_count/utils/loss.py | wyf94/TrafficCount | d16398fb9afbc5dcfcc36face7c3ce72be2a1211 | [
"Apache-2.0"
] | null | null | null | src/traffic_count/utils/loss.py | wyf94/TrafficCount | d16398fb9afbc5dcfcc36face7c3ce72be2a1211 | [
"Apache-2.0"
] | null | null | null | # Loss functions
import torch
import torch.nn as nn
from traffic_count.detector.utils.general import bbox_iou
from traffic_count.detector.utils.torch_utils import is_parallel
def smooth_BCE(eps=0.1): # https://github.com/ultralytics/yolov3/issues/238#issuecomment-598028441
# return positive, negative label smo... | 43.806452 | 120 | 0.550179 |
796b215912dd0f40835a3a818d20a1b98871abaa | 315 | py | Python | ex017.py | rodrigosilvanew/pythonexercicios-guanabara | de9de3109d6ff97d5f61ef41cb8e9db6de37a644 | [
"MIT"
] | null | null | null | ex017.py | rodrigosilvanew/pythonexercicios-guanabara | de9de3109d6ff97d5f61ef41cb8e9db6de37a644 | [
"MIT"
] | null | null | null | ex017.py | rodrigosilvanew/pythonexercicios-guanabara | de9de3109d6ff97d5f61ef41cb8e9db6de37a644 | [
"MIT"
] | null | null | null | from math import pow, sqrt, hypot
CO = float(input('Digite o valor do Cateto Oposto: '))
CA = float(input('Digite o valor do Cateto Adjacente: '))
#HI = sqrt(pow(CO, 2) + pow(CA, 2))
#print('O valor da hipotenusa é igual a {:.2f}.'.format(HI))
HI = hypot(CA, CO)
print('O valor da hipotenusa é {:.2f}.'.format(HI))
| 39.375 | 60 | 0.660317 |
796b228c5d2112c97f67bb2ff796c9c0758b2844 | 1,673 | py | Python | python/plume.py | nmoisseeva/cedarPlumes | 0eb1787b6419ac808919d9a118f7b03967832258 | [
"CNRI-Python"
] | null | null | null | python/plume.py | nmoisseeva/cedarPlumes | 0eb1787b6419ac808919d9a118f7b03967832258 | [
"CNRI-Python"
] | null | null | null | python/plume.py | nmoisseeva/cedarPlumes | 0eb1787b6419ac808919d9a118f7b03967832258 | [
"CNRI-Python"
] | null | null | null | #nmoisseeva@eoas.ubc.ca
#March 2019
import numpy as np
import os.path
import glob
#input values for plume analysis
#--------------------------------
wrfdir = '../complete/'
figdir = './figs/'
lvl = np.arange(0,3201,40) #vertical levels in m
dx = 40. #horizontal grid spacing
cs = 10 ... | 34.142857 | 164 | 0.525403 |
796b248aa2a0d45e8e977f9130c9f218f20efba8 | 2,482 | py | Python | saleor/account/migrations/0049_user_language_code.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/account/migrations/0049_user_language_code.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/account/migrations/0049_user_language_code.py | aminziadna/saleor | 2e78fb5bcf8b83a6278af02551a104cfa555a1fb | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | # Generated by Django 3.1.7 on 2021-03-10 15:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("account", "0048_auto_20210308_1135"),
]
operations = [
migrations.AddField(
model_name="user",
name="language_code",... | 34 | 55 | 0.305802 |
796b253aec60c08ff4204c5420f9dad0ddaec2d3 | 1,485 | py | Python | src/waveform_parser/base_waveform.py | FAU-LS12-RC/Finding-COs-in-Side-Channel-Traces | fcd93980b55e621a267bd75c04612d25ccb45282 | [
"Apache-2.0"
] | 3 | 2021-11-10T19:38:58.000Z | 2022-03-31T10:53:19.000Z | src/waveform_parser/base_waveform.py | FAU-LS12-RC/Finding-COs-on-Side-Channel-Traces | fcd93980b55e621a267bd75c04612d25ccb45282 | [
"Apache-2.0"
] | null | null | null | src/waveform_parser/base_waveform.py | FAU-LS12-RC/Finding-COs-on-Side-Channel-Traces | fcd93980b55e621a267bd75c04612d25ccb45282 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
class BaseWaveform:
def __init__(self):
self.dataValues = list()
self.horizontalTimeAtFrameStart = 0
self.horizontalTimePerSample = 0
self.horizontalUnit = ""
self.verticalUnit = ""
self.byteArray = list()
def getDataValues(self):
tim... | 28.018868 | 77 | 0.660606 |
796b254f5443a0f2741dee85e768e407241f882a | 535 | py | Python | byond/DMIH/directives/Direction.py | PJB3005/ByondToolsv3 | da80d87d474e83f13350acb730173d21e9a6e1ff | [
"MIT"
] | 2 | 2016-11-28T18:26:46.000Z | 2016-11-29T13:27:38.000Z | byond/DMIH/directives/Direction.py | Boggart/ByondTools | aba57218ae72cb210841039fc9c5d794ef114ecf | [
"MIT"
] | 3 | 2016-11-19T04:01:32.000Z | 2020-06-06T12:39:01.000Z | byond/DMIH/directives/Direction.py | Boggart/ByondTools | aba57218ae72cb210841039fc9c5d794ef114ecf | [
"MIT"
] | 2 | 2017-05-18T05:59:23.000Z | 2020-06-06T11:27:59.000Z | '''
Created on Feb 23, 2013
@author: Rob
'''
from .Directive import Directive
from byond import directions
class Direction(Directive):
'''
Tells the compiler which frames will be used for this direction.
'''
'''
Which direction?
'''
dir=0
'''
List of files.
'''
f... | 19.107143 | 68 | 0.590654 |
796b2696af9ce720ed6344121e0aed79ae08ba66 | 73,504 | py | Python | pandas/core/categorical.py | jeffknupp/pandas | 7d0a98e9bfb6c59d5f1738927732ddb80013b581 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/core/categorical.py | jeffknupp/pandas | 7d0a98e9bfb6c59d5f1738927732ddb80013b581 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/core/categorical.py | jeffknupp/pandas | 7d0a98e9bfb6c59d5f1738927732ddb80013b581 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | # pylint: disable=E1101,W0232
import numpy as np
from warnings import warn
import types
from pandas import compat
from pandas.compat import u, lzip
from pandas._libs import lib, algos as libalgos
from pandas.core.dtypes.generic import (
ABCSeries, ABCIndexClass, ABCCategoricalIndex)
from pandas.core.dtypes.missi... | 33.919705 | 79 | 0.580758 |
796b2877845e5fc2943da1dc294d627f38083176 | 9,301 | py | Python | local_configs/tianchi/used/c_r50_1x_a_e64_s1_l002.py | SunshineOnLeft/share | cca0f32fbedb935e5a338ddfcb2694701049f907 | [
"Apache-2.0"
] | 1 | 2020-04-28T11:42:04.000Z | 2020-04-28T11:42:04.000Z | local_configs/tianchi/used/c_r50_1x_a_e64_s1_l002.py | SunshineOnLeft/mmdetection | cca0f32fbedb935e5a338ddfcb2694701049f907 | [
"Apache-2.0"
] | null | null | null | local_configs/tianchi/used/c_r50_1x_a_e64_s1_l002.py | SunshineOnLeft/mmdetection | cca0f32fbedb935e5a338ddfcb2694701049f907 | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='CascadeRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... | 31.962199 | 77 | 0.507902 |
796b29afa703e55ca525c72dc2dd447fbb6d4e3d | 3,090 | py | Python | networkapi/tipoacesso/models.py | brunodevel/GloboNetworkAPI | ea8eebc0337636f9250e628cc392514934db8edd | [
"Apache-2.0"
] | null | null | null | networkapi/tipoacesso/models.py | brunodevel/GloboNetworkAPI | ea8eebc0337636f9250e628cc392514934db8edd | [
"Apache-2.0"
] | null | null | null | networkapi/tipoacesso/models.py | brunodevel/GloboNetworkAPI | ea8eebc0337636f9250e628cc392514934db8edd | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (th... | 35.930233 | 109 | 0.701942 |
796b2b67ef6900bd61311f4fc51c0234e725f53a | 6,044 | py | Python | spellcor_models/nglm.py | xvshiting/SpellCor | b7e2f9457f602975b4d2e7f243e69a928961fbcf | [
"MIT"
] | 4 | 2019-10-28T02:11:49.000Z | 2022-01-26T07:13:57.000Z | spellcor_models/nglm.py | xvshiting/SpellCor | b7e2f9457f602975b4d2e7f243e69a928961fbcf | [
"MIT"
] | 1 | 2022-01-04T08:55:23.000Z | 2022-01-20T09:49:32.000Z | spellcor_models/nglm.py | xvshiting/SpellCor | b7e2f9457f602975b4d2e7f243e69a928961fbcf | [
"MIT"
] | null | null | null | """
my 3-gram language model
"""
import codecs
import os
import pickle
import spellcor_utils
import re
from collections import Counter
import math
model_name = "nglm.bin"
UNK = "$unk$"
class NGramLanguageModel:
def __init__(self):
self.one_gram_count_dict = dict()
self.two_gram_count_dict = dict... | 33.765363 | 96 | 0.652713 |
796b2be982aa93c4c30418c16945097ff1811008 | 2,338 | py | Python | defs/polylearn_fm_pn.py | BrutishGuy/hyperband-astcvs | d52562d64d2b0ba63f4bba7022114da7bb9e0281 | [
"BSD-2-Clause"
] | null | null | null | defs/polylearn_fm_pn.py | BrutishGuy/hyperband-astcvs | d52562d64d2b0ba63f4bba7022114da7bb9e0281 | [
"BSD-2-Clause"
] | null | null | null | defs/polylearn_fm_pn.py | BrutishGuy/hyperband-astcvs | d52562d64d2b0ba63f4bba7022114da7bb9e0281 | [
"BSD-2-Clause"
] | null | null | null | "function (and parameter space) definitions for hyperband"
"binary classification with polylearn FM/PN"
from common_defs import *
# a dict with x_train, y_train, x_test, y_test
from load_data import data
from polylearn import FactorizationMachineClassifier as FM
from polylearn import PolynomialNetworkClassi... | 27.833333 | 91 | 0.639435 |
796b2d29e74c4d9c7aea72a1253716ff33025830 | 1,305 | py | Python | glue/viewers/image/qt/contrast_mouse_mode.py | sergiopasra/glue | c25a217a122a11818382672c99cb21f57a30636f | [
"BSD-3-Clause"
] | null | null | null | glue/viewers/image/qt/contrast_mouse_mode.py | sergiopasra/glue | c25a217a122a11818382672c99cb21f57a30636f | [
"BSD-3-Clause"
] | null | null | null | glue/viewers/image/qt/contrast_mouse_mode.py | sergiopasra/glue | c25a217a122a11818382672c99cb21f57a30636f | [
"BSD-3-Clause"
] | null | null | null | # New contrast/bias mode that operates on viewers with state objects
from __future__ import absolute_import, division, print_function
from glue.external.echo import delay_callback
from glue.config import viewer_tool
from glue.viewers.common.qt.toolbar_mode import ToolbarModeBase
@viewer_tool
class ContrastBiasMode(... | 31.829268 | 82 | 0.664368 |
796b2e632268a2e58364608715097c186587ecde | 6,135 | py | Python | asposewordscloud/models/table_row_format_response.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | asposewordscloud/models/table_row_format_response.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | asposewordscloud/models/table_row_format_response.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="table_row_format_response.py">
# Copyright (c) 2020 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a co... | 34.857955 | 87 | 0.588753 |
796b302d56f17773e02275d3cb3600e03c92dce2 | 2,282 | py | Python | examples/scrapy/newsProject/news/spiders/abcnews.py | kbdering/ncscli | 853055b390238111efb31cb466c857a5ea886896 | [
"MIT"
] | 3 | 2020-10-02T23:25:05.000Z | 2022-03-29T10:28:33.000Z | examples/scrapy/newsProject/news/spiders/abcnews.py | kbdering/ncscli | 853055b390238111efb31cb466c857a5ea886896 | [
"MIT"
] | null | null | null | examples/scrapy/newsProject/news/spiders/abcnews.py | kbdering/ncscli | 853055b390238111efb31cb466c857a5ea886896 | [
"MIT"
] | 3 | 2020-09-28T23:22:53.000Z | 2021-11-28T11:36:04.000Z | import urllib
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
def anyFound( a, b ):
''' return true iff any items from iterable a is found in iterable b '''
for x in a:
if x in b:
return True
return False
def enquote( txt ):
... | 30.026316 | 84 | 0.588081 |
796b305640b490be7edf9c2338ccf605c0027b6e | 253 | py | Python | pycromanager/__init__.py | RaymondDunn/pycro-manager | b7c1a7b84b31b5d8587934c569fd5de2c44114fe | [
"BSD-3-Clause"
] | 88 | 2020-05-08T16:54:24.000Z | 2022-03-09T01:03:04.000Z | pycromanager/__init__.py | RaymondDunn/pycro-manager | b7c1a7b84b31b5d8587934c569fd5de2c44114fe | [
"BSD-3-Clause"
] | 200 | 2020-05-15T13:21:44.000Z | 2022-03-31T17:55:23.000Z | pycromanager/__init__.py | RaymondDunn/pycro-manager | b7c1a7b84b31b5d8587934c569fd5de2c44114fe | [
"BSD-3-Clause"
] | 31 | 2020-04-30T03:22:50.000Z | 2022-03-19T18:00:32.000Z | name = "pycromanager"
from pycromanager.acquire import Acquisition, multi_d_acquisition_events, start_headless
from pycromanager.core import Bridge, JavaObjectShadow
from pycromanager.data import Dataset
from ._version import __version__, version_info
| 36.142857 | 88 | 0.86166 |
796b318fe642dcf2c297711bc7f1ec0a8441ba62 | 1,179 | py | Python | pweave/mimetypes.py | piccolbo/Pweave | 62a740e46c16b3aecce53aa951792b33ac93e1a2 | [
"BSD-3-Clause"
] | 1 | 2018-12-14T17:48:36.000Z | 2018-12-14T17:48:36.000Z | pweave/mimetypes.py | piccolbo/Pweave | 62a740e46c16b3aecce53aa951792b33ac93e1a2 | [
"BSD-3-Clause"
] | 8 | 2018-12-13T05:00:33.000Z | 2018-12-15T19:07:01.000Z | pweave/mimetypes.py | piccolbo/Pweave | 62a740e46c16b3aecce53aa951792b33ac93e1a2 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
class MimeType(object):
"""Default mimetypes for input extensions"""
def __init__(self, mimetype, file_ext):
self.type = mimetype
self.file_ext = file_ext
class MimeTypes(object):
"""Methods for handling mimetypes and file extensions"""
# Supported input types
... | 25.085106 | 62 | 0.589483 |
796b331ea7bb2f5cf5a020b103b93effdd7534ee | 688 | py | Python | Ticketing_System/ticksys/models.py | gbarandiaran/ticksys | 028ca8f1fbda6e2f09238f320ffd75aaea347100 | [
"Apache-2.0"
] | null | null | null | Ticketing_System/ticksys/models.py | gbarandiaran/ticksys | 028ca8f1fbda6e2f09238f320ffd75aaea347100 | [
"Apache-2.0"
] | null | null | null | Ticketing_System/ticksys/models.py | gbarandiaran/ticksys | 028ca8f1fbda6e2f09238f320ffd75aaea347100 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
import datetime
from django.core.urlresolvers import reverse
class Ticket(models.Model):
id = models.AutoField(primary_key=True)
title = models.CharField(max_length=40)
... | 36.210526 | 71 | 0.74564 |
796b346827bd6b80b49d76e963dfbe28728791bc | 102 | py | Python | Mundo 2/ex046.py | torvigoes/Exercicios-Python3 | 1c1ef59087405cd2272808802fd00fe0bb49a5fd | [
"MIT"
] | 1 | 2021-01-06T22:12:30.000Z | 2021-01-06T22:12:30.000Z | Mundo 2/ex046.py | torvigoes/Exercicios-Python3 | 1c1ef59087405cd2272808802fd00fe0bb49a5fd | [
"MIT"
] | null | null | null | Mundo 2/ex046.py | torvigoes/Exercicios-Python3 | 1c1ef59087405cd2272808802fd00fe0bb49a5fd | [
"MIT"
] | null | null | null | from time import sleep
for c in range(10, 0, -1):
print(c)
sleep(1)
print('KABUMMMMMMMMMMMM') | 17 | 26 | 0.656863 |
796b34df6036f8ff9ab2d7b28ad445d085578968 | 182 | py | Python | scripts/item/consume_2435044.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/item/consume_2435044.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/item/consume_2435044.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | # Heroes Mercedes Damage Skin
success = sm.addDamageSkin(2435044)
if success:
sm.chat("The Heroes Mercedes Damage Skin has been added to your account's damage skin collection.")
| 36.4 | 103 | 0.774725 |
796b356c002d1174f52795d41c426ab60ed7e7be | 473 | py | Python | Exam 22.08.2020/project/rooms/young_couple.py | milenpenev/SoftUni-OOP | 90f730cb37713f7ca93b1c0ecd0d12aa351247d2 | [
"MIT"
] | null | null | null | Exam 22.08.2020/project/rooms/young_couple.py | milenpenev/SoftUni-OOP | 90f730cb37713f7ca93b1c0ecd0d12aa351247d2 | [
"MIT"
] | null | null | null | Exam 22.08.2020/project/rooms/young_couple.py | milenpenev/SoftUni-OOP | 90f730cb37713f7ca93b1c0ecd0d12aa351247d2 | [
"MIT"
] | null | null | null | from project.appliances.fridge import Fridge
from project.appliances.laptop import Laptop
from project.appliances.tv import TV
from project.rooms.room import Room
class YoungCouple(Room):
def __init__(self, family_name, salary_one, salary_two):
super().__init__(family_name, salary_one + salary_two, 2)
... | 36.384615 | 78 | 0.725159 |
796b367c30ceb43f5c48ad789aa9c381e1f87af5 | 3,015 | py | Python | src/oci/opsi/models/host_instance_map.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/opsi/models/host_instance_map.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/opsi/models/host_instance_map.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 29.558824 | 245 | 0.64743 |
796b36c0078b1a084b7dddbf51fb7c6a5b2089f0 | 2,832 | py | Python | user_g11n/tests/test_middleware.py | salexkidd/django-user-g11n | 88e0424dcb3be5282337df73c541b7a53890c90b | [
"MIT"
] | 28 | 2020-05-04T18:38:35.000Z | 2022-02-02T17:18:00.000Z | user_g11n/tests/test_middleware.py | salexkidd/django-user-g11n | 88e0424dcb3be5282337df73c541b7a53890c90b | [
"MIT"
] | 1 | 2020-05-05T10:56:24.000Z | 2020-05-12T00:53:04.000Z | user_g11n/tests/test_middleware.py | salexkidd/django-user-g11n | 88e0424dcb3be5282337df73c541b7a53890c90b | [
"MIT"
] | 1 | 2020-05-11T22:02:06.000Z | 2020-05-11T22:02:06.000Z | from django.conf import settings
from django.test import Client, RequestFactory, TestCase
from django.test.utils import override_settings
from django.urls import reverse
from .. import factories as accounts_factories
class TestUserTimeZone(TestCase):
def setUp(self):
self.client = Client()
def test_... | 32.551724 | 75 | 0.663136 |
796b378abe5c8b633404407fd557e54ac806e692 | 2,508 | py | Python | src/day5.py | StenAL/Advent-of-Code-2021 | 57c1b11c3a83ed75520875f4811f3bb1e9ebc950 | [
"MIT"
] | 1 | 2021-12-03T20:11:51.000Z | 2021-12-03T20:11:51.000Z | src/day5.py | StenAL/Advent-of-Code-2021 | 57c1b11c3a83ed75520875f4811f3bb1e9ebc950 | [
"MIT"
] | null | null | null | src/day5.py | StenAL/Advent-of-Code-2021 | 57c1b11c3a83ed75520875f4811f3bb1e9ebc950 | [
"MIT"
] | null | null | null | from util import *
from collections import *
import copy
day = 5
def task1():
data = get_input_for_day(day)
# data = get_input_for_file("test")
data = [line.replace(" -> ", ",").split(",") for line in data]
data = [[int(point) for point in points] for points in data]
straight_lines = [points for ... | 31.746835 | 100 | 0.468501 |
796b37dbba36d02ea66d84ff59f15594bc7f08af | 1,389 | py | Python | app/accounts/urls.py | porowns/Krypted-Auth | ed171bfbd1c98a4c171ddf6a20b18691330b1646 | [
"MIT"
] | 6 | 2017-12-13T21:53:05.000Z | 2018-10-04T02:47:05.000Z | app/accounts/urls.py | porowns/Krypted-Auth | ed171bfbd1c98a4c171ddf6a20b18691330b1646 | [
"MIT"
] | 106 | 2019-08-11T23:00:39.000Z | 2021-06-10T19:45:54.000Z | app/accounts/urls.py | KryptedGaming/kryptedauth | ed171bfbd1c98a4c171ddf6a20b18691330b1646 | [
"MIT"
] | 10 | 2020-01-18T11:28:44.000Z | 2022-02-21T06:08:39.000Z | from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from django.contrib import admin
from django.urls import path, re_path
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
path('register/', views.UserRegister.as_view(),... | 47.896552 | 100 | 0.666667 |
796b381e952238c219e5c3295ad58ed158bfae40 | 15,913 | py | Python | pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py | khazit/pytorch-lightning | 351c11ff6ff872642ce27eabfd9a98b3e3b8e1a5 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py | khazit/pytorch-lightning | 351c11ff6ff872642ce27eabfd9a98b3e3b8e1a5 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py | khazit/pytorch-lightning | 351c11ff6ff872642ce27eabfd9a98b3e3b8e1a5 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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... | 42.662198 | 120 | 0.694275 |
796b3941a9493ffc29761c58e1811bf817fb9698 | 16,409 | py | Python | client/commands/v2/start.py | gbleaney/pyre-check | d27297ed13537df076de1ec3772b121f03d79d8b | [
"MIT"
] | null | null | null | client/commands/v2/start.py | gbleaney/pyre-check | d27297ed13537df076de1ec3772b121f03d79d8b | [
"MIT"
] | null | null | null | client/commands/v2/start.py | gbleaney/pyre-check | d27297ed13537df076de1ec3772b121f03d79d8b | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import contextlib
import dataclasses
import datetime
import enum
import json
import logging
import os
import subprocess
import tempfile
from p... | 34.618143 | 88 | 0.664757 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.