hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5012f3d859038bf6c7551a9b09f30a8dc7a2a8ae | 7,549 | py | Python | ml_techniques/tests/tests.py | tgquintela/ml_techniques_in_python | 242ff12b32edb313c983394f3153a8b7eb8ce183 | [
"MIT"
] | null | null | null | ml_techniques/tests/tests.py | tgquintela/ml_techniques_in_python | 242ff12b32edb313c983394f3153a8b7eb8ce183 | [
"MIT"
] | null | null | null | ml_techniques/tests/tests.py | tgquintela/ml_techniques_in_python | 242ff12b32edb313c983394f3153a8b7eb8ce183 | [
"MIT"
] | null | null | null | import numpy as np
import unittest
from itertools import product
from ml_techniques.svm import *
| 33.700893 | 77 | 0.601537 |
501312c476ded79ec6cb9b0965b516133cb44842 | 430 | bzl | Python | deps/deno/repository.bzl | y0psolo/YAD | 0f1f9c5140687345dee591667793d6f8ed6e29e5 | [
"Apache-2.0"
] | 1 | 2021-11-05T09:13:57.000Z | 2021-11-05T09:13:57.000Z | deps/deno/repository.bzl | y0psolo/YAD | 0f1f9c5140687345dee591667793d6f8ed6e29e5 | [
"Apache-2.0"
] | 9 | 2021-12-02T13:25:52.000Z | 2022-01-26T14:24:05.000Z | deps/deno/repository.bzl | y0psolo/YAD | 0f1f9c5140687345dee591667793d6f8ed6e29e5 | [
"Apache-2.0"
] | null | null | null | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
| 35.833333 | 112 | 0.669767 |
501610d9ff0b5e179cb5002235857a130ed0cb4e | 8,184 | py | Python | src/oci/ai_vision/models/detected_language.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/ai_vision/models/detected_language.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/ai_vision/models/detected_language.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... | 38.971429 | 253 | 0.669599 |
501674bfb30dc18bcd6f3983353a1c018cbc6af0 | 1,905 | py | Python | source-code/Word Ladder 127.py | ttungl/Coding-Interview-Challenge | d80c3e15468d50b42ee53fcc73e9326c6c816495 | [
"MIT"
] | null | null | null | source-code/Word Ladder 127.py | ttungl/Coding-Interview-Challenge | d80c3e15468d50b42ee53fcc73e9326c6c816495 | [
"MIT"
] | null | null | null | source-code/Word Ladder 127.py | ttungl/Coding-Interview-Challenge | d80c3e15468d50b42ee53fcc73e9326c6c816495 | [
"MIT"
] | null | null | null | # 127. Word Ladder
# ttungl@gmail.com
# Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that:
# Only one letter can be changed at a time.
# Each transformed word must exist in the word list. Note that beginWord i... | 32.288136 | 162 | 0.607874 |
5017d91a4f43fb84e8e4e3ab54b9dd80d44b71a3 | 2,530 | py | Python | lexer/groovylexer.py | rhyolight/pygments-groovy | b80282f873d09d5709508078179a41a69a8c3ed4 | [
"BSD-3-Clause"
] | 1 | 2016-05-08T23:59:33.000Z | 2016-05-08T23:59:33.000Z | lexer/groovylexer.py | rhyolight/pygments-groovy | b80282f873d09d5709508078179a41a69a8c3ed4 | [
"BSD-3-Clause"
] | null | null | null | lexer/groovylexer.py | rhyolight/pygments-groovy | b80282f873d09d5709508078179a41a69a8c3ed4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Lexer for the Groovy programming language
http://groovy.codehaus.org
"""
from pygments.lexer import RegexLexer | 39.53125 | 86 | 0.462451 |
5019020d7b680c6e2d3cae1add3c2247c0136f62 | 10,243 | py | Python | official/nlp/modeling/layers/cls_head.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 1 | 2021-12-03T00:11:14.000Z | 2021-12-03T00:11:14.000Z | official/nlp/modeling/layers/cls_head.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 2 | 2021-03-24T23:09:46.000Z | 2021-03-25T18:42:10.000Z | official/nlp/modeling/layers/cls_head.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 1 | 2021-03-26T02:26:42.000Z | 2021-03-26T02:26:42.000Z | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.689895 | 80 | 0.691399 |
501a6e4b0542dfab3ece831a797cbcd4d5a9b0c2 | 7,119 | py | Python | oembed/migrations/0001_initial.py | EightMedia/djangoembed | ee325f7375c48405f9c3e7e2c0fa7f5a08fafd48 | [
"MIT"
] | 8 | 2015-02-06T19:18:49.000Z | 2021-01-01T05:46:02.000Z | oembed/migrations/0001_initial.py | EightMedia/djangoembed | ee325f7375c48405f9c3e7e2c0fa7f5a08fafd48 | [
"MIT"
] | null | null | null | oembed/migrations/0001_initial.py | EightMedia/djangoembed | ee325f7375c48405f9c3e7e2c0fa7f5a08fafd48 | [
"MIT"
] | 5 | 2015-03-15T11:41:26.000Z | 2018-03-08T09:45:26.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.conf import settings
from django.db import models
| 62.447368 | 197 | 0.606827 |
501ab238dad07fef93d094d64c69011390603b6e | 669 | py | Python | cntr/service/receive.py | ethan-iai/tour-recmd | 321ee528b748900eff9d22b176cdcd339fb60681 | [
"MIT"
] | 2 | 2021-08-01T06:39:43.000Z | 2021-08-01T06:39:58.000Z | cntr/service/receive.py | ethan-iai/tour-recmd | 321ee528b748900eff9d22b176cdcd339fb60681 | [
"MIT"
] | 1 | 2021-06-08T11:24:30.000Z | 2021-06-09T07:47:26.000Z | cntr/service/receive.py | ethan-iai/tour-recmd | 321ee528b748900eff9d22b176cdcd339fb60681 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
from cntr.service.base import TextMsg, ImageMsg, LocationMsg, VoiceMsg
| 27.875 | 70 | 0.584454 |
501c3280eed3f39c1378cb20b8407ca47e64ad8a | 2,309 | py | Python | pages/data_upload.py | irzaip/selevaporum | 05754f2a8152185f550e1135feb94fdc85e4046c | [
"MIT"
] | null | null | null | pages/data_upload.py | irzaip/selevaporum | 05754f2a8152185f550e1135feb94fdc85e4046c | [
"MIT"
] | null | null | null | pages/data_upload.py | irzaip/selevaporum | 05754f2a8152185f550e1135feb94fdc85e4046c | [
"MIT"
] | null | null | null | import collections
from numpy.core.defchararray import lower
import streamlit as st
import numpy as np
import pandas as pd
from pages import utils
| 39.810345 | 106 | 0.632308 |
501c4eef87e41e664070910134642c391a29e880 | 832 | py | Python | uso_red/migrations/0001_initial.py | joelsegoviacrespo/control_aforo_migrado | be90d1d45a20f735e7ef20449c4ab91ca05b5d85 | [
"MIT"
] | null | null | null | uso_red/migrations/0001_initial.py | joelsegoviacrespo/control_aforo_migrado | be90d1d45a20f735e7ef20449c4ab91ca05b5d85 | [
"MIT"
] | null | null | null | uso_red/migrations/0001_initial.py | joelsegoviacrespo/control_aforo_migrado | be90d1d45a20f735e7ef20449c4ab91ca05b5d85 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.13 on 2020-11-26 03:26
from django.db import migrations, models
import djongo.models.fields
| 28.689655 | 114 | 0.564904 |
501d0008e868acaa4fedee6bdf54ba6f0c7c1b8d | 5,438 | py | Python | sweep_builder/scorable.py | panoramichq/data-collection-fb | 550b90a303c880ae8c3dfd2801dc4f991a969f89 | [
"MIT"
] | null | null | null | sweep_builder/scorable.py | panoramichq/data-collection-fb | 550b90a303c880ae8c3dfd2801dc4f991a969f89 | [
"MIT"
] | null | null | null | sweep_builder/scorable.py | panoramichq/data-collection-fb | 550b90a303c880ae8c3dfd2801dc4f991a969f89 | [
"MIT"
] | null | null | null | import logging
from collections import defaultdict
from typing import Iterable, Generator, Optional
from pynamodb.exceptions import DoesNotExist
from common.enums.entity import Entity
from common.enums.jobtype import detect_job_type
from config.application import PERMANENTLY_FAILING_JOB_THRESHOLD
from config.jobs im... | 38.295775 | 114 | 0.696396 |
501dcb0c9d559197f9d0137f85f4646aa314aebc | 1,782 | py | Python | import_em.py | kaija/taiwan_stockloader | 637244c3b0bc96093cc5a7b3df093a829f9e3c2d | [
"MIT"
] | 2 | 2015-06-13T09:17:46.000Z | 2015-10-25T15:31:33.000Z | import_em.py | kaija/taiwan_stockloader | 637244c3b0bc96093cc5a7b3df093a829f9e3c2d | [
"MIT"
] | null | null | null | import_em.py | kaija/taiwan_stockloader | 637244c3b0bc96093cc5a7b3df093a829f9e3c2d | [
"MIT"
] | 3 | 2016-02-01T07:36:55.000Z | 2018-08-03T12:22:20.000Z | #!/usr/bin/python
import datetime
import httplib
import urllib
import redis
import json
from datetime import timedelta
#now = datetime.datetime.now();
#today = now.strftime('%Y-%m-%d')
#print today
rdb = redis.Redis('localhost')
today = datetime.date.today()
one_day = timedelta(days=1);
start_day = datetime.date... | 20.25 | 259 | 0.64422 |
501e238ecce4d14dde53565c91651d0fe9f9fbc1 | 5,453 | py | Python | LaserController/InterfaceGUI.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | LaserController/InterfaceGUI.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | LaserController/InterfaceGUI.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'InterfaceGUI.ui'
#
# Created: Mon Mar 11 15:56:47 2013
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtWidgets
try:
from PyQt5 import QtCore, QtGui
excep... | 47.417391 | 109 | 0.708601 |
501f4dae72eb2773eebea6e00006189d15c72360 | 302 | py | Python | src/sportsdata/nba/teams/washington_wizards.py | OrangeCardinal/sportsdata | e6e182e89c8f8a12ffe18b218a37b8bdb8971e03 | [
"Apache-2.0"
] | null | null | null | src/sportsdata/nba/teams/washington_wizards.py | OrangeCardinal/sportsdata | e6e182e89c8f8a12ffe18b218a37b8bdb8971e03 | [
"Apache-2.0"
] | null | null | null | src/sportsdata/nba/teams/washington_wizards.py | OrangeCardinal/sportsdata | e6e182e89c8f8a12ffe18b218a37b8bdb8971e03 | [
"Apache-2.0"
] | null | null | null | from sports.nba.nba_team import NBA_Team
| 17.764706 | 47 | 0.612583 |
501ffd3a5b4084f880ca38c9bb54d4225d927e52 | 1,305 | py | Python | modules/text/sentiment_analysis/senta_cnn/net.py | Steffy-zxf/HubModule | 40b0563f86634714033ab7712a08a58eba81bad1 | [
"Apache-2.0"
] | null | null | null | modules/text/sentiment_analysis/senta_cnn/net.py | Steffy-zxf/HubModule | 40b0563f86634714033ab7712a08a58eba81bad1 | [
"Apache-2.0"
] | null | null | null | modules/text/sentiment_analysis/senta_cnn/net.py | Steffy-zxf/HubModule | 40b0563f86634714033ab7712a08a58eba81bad1 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
import paddle.fluid as fluid
def cnn_net(data,
dict_dim,
emb_dim=128,
hid_dim=128,
hid_dim2=96,
class_dim=2,
win_size=3):
"""
Conv net
"""
# embedding layer
emb = fluid.layers.embedding(
input=da... | 28.369565 | 78 | 0.609195 |
50205455dc5f8bdf7fc11d558fec2bdbb9a250dd | 944 | py | Python | test/test_scripts.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | test/test_scripts.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | test/test_scripts.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import runpy
import os
import pytest
import glob
THIS_FILES_DIR_PATH = os.path.realpath(os.path.dirname(__file__))
| 25.513514 | 87 | 0.680085 |
50225dc303362b68cabbf1199f96dcd33b1c08db | 31,316 | py | Python | python/brainvisa/maker/components_definition.py | brainvisa/brainvisa-cmake | 2b4c4c6aae45e036a54d655b064f4d1a2b7b2061 | [
"CECILL-B"
] | null | null | null | python/brainvisa/maker/components_definition.py | brainvisa/brainvisa-cmake | 2b4c4c6aae45e036a54d655b064f4d1a2b7b2061 | [
"CECILL-B"
] | 77 | 2018-10-30T11:28:16.000Z | 2022-02-28T14:21:40.000Z | python/brainvisa/maker/components_definition.py | brainvisa/brainvisa-cmake | 2b4c4c6aae45e036a54d655b064f4d1a2b7b2061 | [
"CECILL-B"
] | 1 | 2019-07-17T14:08:22.000Z | 2019-07-17T14:08:22.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import sys
# groups:
# anatomist: projects needed for anatomist (aims, soma-io and dependencies)
# opensource
# brainvisa: public brainvisa distro
# bvdev: same as brainvisa but excludes restricted access projects
# (such as brainrat-priv... | 56.938182 | 545 | 0.536243 |
5022938aba6c91cfd4336b99f65d9f2b0ba733cd | 977 | py | Python | examples/hashtrees.py | ascribe/transactions | 08f344ce1879152d2a0ba51dda76f11e73c83867 | [
"Apache-2.0"
] | 124 | 2015-05-11T09:51:09.000Z | 2021-11-17T15:38:17.000Z | examples/hashtrees.py | chasealias/transactions | 08f344ce1879152d2a0ba51dda76f11e73c83867 | [
"Apache-2.0"
] | 58 | 2016-02-22T10:08:11.000Z | 2018-10-16T17:34:13.000Z | examples/hashtrees.py | chasealias/transactions | 08f344ce1879152d2a0ba51dda76f11e73c83867 | [
"Apache-2.0"
] | 24 | 2015-05-18T19:16:44.000Z | 2021-05-31T09:51:32.000Z | # -*- coding: utf-8 -*-
"""
Inspired by:
* https://gist.github.com/shirriff/c9fb5d98e6da79d9a772#file-merkle-py
* https://github.com/richardkiss/pycoin
"""
from __future__ import absolute_import, division, unicode_literals
from builtins import range
import binascii
import hashlib
def merkleroot(hashes):
... | 28.735294 | 75 | 0.660184 |
50236b02c8e8d9823839d03fe29cb5157a9c7e08 | 1,273 | py | Python | test/test_del_contact_from_group.py | julipavlovich/python_training | 0ca2320b89b1bb40926d7c8b1ecb0278998fa4be | [
"Apache-2.0"
] | null | null | null | test/test_del_contact_from_group.py | julipavlovich/python_training | 0ca2320b89b1bb40926d7c8b1ecb0278998fa4be | [
"Apache-2.0"
] | null | null | null | test/test_del_contact_from_group.py | julipavlovich/python_training | 0ca2320b89b1bb40926d7c8b1ecb0278998fa4be | [
"Apache-2.0"
] | null | null | null | from model.contact import Contact
from model.group import Group
import random
| 43.896552 | 93 | 0.750196 |
50241f1b6c840c3a0e9187ec807790ee1359dfdf | 1,945 | py | Python | test.py | termistotel/CherryPyStuff | 84659f8cd3c2b6f7d17c79c3a0bafdac4ad85a68 | [
"MIT"
] | null | null | null | test.py | termistotel/CherryPyStuff | 84659f8cd3c2b6f7d17c79c3a0bafdac4ad85a68 | [
"MIT"
] | null | null | null | test.py | termistotel/CherryPyStuff | 84659f8cd3c2b6f7d17c79c3a0bafdac4ad85a68 | [
"MIT"
] | null | null | null | import dill as pickle
import cherrypy
homeLocation = '/home/alion/Projekti/cherrypyTest'
rootConfig = {'/': {'log.screen': False,
'log.access_file': homeLocation+'/logs/access_file.log',
'log.error_file': homeLocation+'/logs/error_file.log',
'tools.sessions.on': True,
... | 32.966102 | 84 | 0.582519 |
502575823cd86b4b2ecb13d681cb93aec7e91dfa | 202 | py | Python | main/admin.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | main/admin.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | main/admin.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from simple_history.admin import SimpleHistoryAdmin
from .models import MainMetadata
# Register your models here.
admin.site.register(MainMetadata, SimpleHistoryAdmin) | 28.857143 | 53 | 0.851485 |
5025e7ee5d5562ae40919351cc1f7e7d9a8bf87c | 17,839 | py | Python | FEArena/feaapi/api/skills/helper.py | Superbird11/FEArena | 76b32dd9d4fddc62c191225e332560e0e9ed2c9e | [
"MIT"
] | 1 | 2020-12-25T03:33:44.000Z | 2020-12-25T03:33:44.000Z | FEArena/feaapi/api/skills/helper.py | Superbird11/FEArena | 76b32dd9d4fddc62c191225e332560e0e9ed2c9e | [
"MIT"
] | null | null | null | FEArena/feaapi/api/skills/helper.py | Superbird11/FEArena | 76b32dd9d4fddc62c191225e332560e0e9ed2c9e | [
"MIT"
] | null | null | null | from typing import Iterable as Iterable, List, Dict, Callable, Iterator, Set, Optional
from ...models.core.Unit import Unit
from ...models.core.Class import Class
from ...models.core.Weapon import Weapon
from ...models.core.Item import Item
from ...models.core.Skill import Skill
from ...models.play.ActiveArena import A... | 51.114613 | 120 | 0.71254 |
5025f16dc15906f1c7c7af67d516b81c43cb2edb | 967 | bzl | Python | source/bazel/deps/libevent/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 1 | 2019-01-06T08:45:46.000Z | 2019-01-06T08:45:46.000Z | source/bazel/deps/libevent/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 264 | 2015-11-30T08:34:00.000Z | 2018-06-26T02:28:41.000Z | source/bazel/deps/libevent/get.bzl | UniLang/compiler | c338ee92994600af801033a37dfb2f1a0c9ca897 | [
"MIT"
] | null | null | null | # Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
| 37.192308 | 130 | 0.623578 |
502807db93679f10580d12e8bb304e4225f4b690 | 15,190 | py | Python | pygsti/modelmembers/states/cptpstate.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | null | null | null | pygsti/modelmembers/states/cptpstate.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | null | null | null | pygsti/modelmembers/states/cptpstate.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | null | null | null | """
The CPTPState class and supporting functionality.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Govern... | 42.430168 | 113 | 0.600263 |
5028c313079fad9b4cf51c75e556c2cffcedcdc1 | 298 | py | Python | examples/mach_opt_examples/LegacyCode/IM/machine_design/im_settingshandler.py | Severson-Group/MachEval | dbb7999188133f8744636da53cab475ae538ce80 | [
"BSD-3-Clause"
] | 6 | 2021-11-02T20:12:32.000Z | 2021-11-13T10:50:35.000Z | examples/mach_opt_examples/LegacyCode/IM/machine_design/im_settingshandler.py | Severson-Group/MachEval | dbb7999188133f8744636da53cab475ae538ce80 | [
"BSD-3-Clause"
] | 18 | 2021-11-29T20:14:55.000Z | 2022-03-02T07:17:37.000Z | examples/mach_opt_examples/LegacyCode/IM/machine_design/im_settingshandler.py | Severson-Group/MachEval | dbb7999188133f8744636da53cab475ae538ce80 | [
"BSD-3-Clause"
] | 1 | 2022-01-29T00:52:38.000Z | 2022-01-29T00:52:38.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 30 11:58:20 2021
@author: Martin Johnson
"""
import sys
sys.path.append("...")
import macheval as me
| 19.866667 | 73 | 0.701342 |
5029b3ee53519f158d3ce03f346eb8d5c279dd5f | 1,596 | py | Python | scripts/cerealfiller_entity_and_test_pipeline.py | sedgewickmm18/functions | 69d04a67b122601c4f207ded8e872d31b2ddafc8 | [
"Apache-2.0"
] | null | null | null | scripts/cerealfiller_entity_and_test_pipeline.py | sedgewickmm18/functions | 69d04a67b122601c4f207ded8e872d31b2ddafc8 | [
"Apache-2.0"
] | null | null | null | scripts/cerealfiller_entity_and_test_pipeline.py | sedgewickmm18/functions | 69d04a67b122601c4f207ded8e872d31b2ddafc8 | [
"Apache-2.0"
] | null | null | null | import datetime as dt
import json
import os
import pandas as pd
from sqlalchemy import Column, Integer, String, Float, DateTime, Boolean, func
from iotfunctions.preprocessor import BaseTransformer
from iotfunctions.bif import IoTExpression
from iotfunctions.metadata import EntityType, make_sample_entity
from iotfunctio... | 36.272727 | 105 | 0.740602 |
5029f3a83b6307a58318c91798649927beb20509 | 1,022 | py | Python | minst/tests/helpers.py | oriolromani/minst-dataset | 5847ac421522a393df77ca2a43acdc326f7d64e8 | [
"0BSD"
] | 44 | 2016-03-26T13:41:09.000Z | 2022-01-19T08:52:47.000Z | minst/tests/helpers.py | oriolromani/minst-dataset | 5847ac421522a393df77ca2a43acdc326f7d64e8 | [
"0BSD"
] | 37 | 2016-05-25T06:32:44.000Z | 2018-08-21T09:15:40.000Z | minst/tests/helpers.py | oriolromani/minst-dataset | 5847ac421522a393df77ca2a43acdc326f7d64e8 | [
"0BSD"
] | 8 | 2016-05-25T13:45:44.000Z | 2021-06-18T12:14:01.000Z | import pytest
import os
import numpy as np
import minst.taxonomy as tax
def __test_pd_output(pd_output, dataset):
"""Make sure all the files in the tree exist"""
# Check for valid columns
required_columns = ['audio_file', 'dataset', 'instrument']
for column in required_columns:
assert colum... | 28.388889 | 73 | 0.687867 |
502b24ddf0d51348bd70135dbd9dd0e4f5a0717b | 2,161 | py | Python | pwncat/modules/linux/enumerate/system/selinux.py | Mitul16/pwncat | b8d7876a9779c2c7796a9a29110d3f1cda721dff | [
"MIT"
] | 1,454 | 2020-05-07T02:20:52.000Z | 2022-03-31T21:32:22.000Z | pwncat/modules/linux/enumerate/system/selinux.py | akr3ch/pwncat | d67865bdaac60dd0761d0698062e7b443a62c6db | [
"MIT"
] | 187 | 2020-05-08T06:26:01.000Z | 2022-03-07T21:15:29.000Z | pwncat/modules/linux/enumerate/system/selinux.py | akr3ch/pwncat | d67865bdaac60dd0761d0698062e7b443a62c6db | [
"MIT"
] | 184 | 2020-05-07T02:31:58.000Z | 2022-03-31T09:11:59.000Z | #!/usr/bin/env python3
from typing import Dict
import rich.markup
from pwncat.db import Fact
from pwncat.platform.linux import Linux
from pwncat.modules.enumerate import Schedule, EnumerateModule
class Module(EnumerateModule):
"""
Retrieve the current SELinux state
"""
PROVIDES = ["system.selinux"... | 28.434211 | 85 | 0.559 |
502b6bdebbd7460f59282e2c237e23c39d25bf84 | 2,975 | py | Python | rally_openstack/task/scenarios/gnocchi/archive_policy_rule.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | rally_openstack/task/scenarios/gnocchi/archive_policy_rule.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | rally_openstack/task/scenarios/gnocchi/archive_policy_rule.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | 1 | 2021-08-10T03:11:51.000Z | 2021-08-10T03:11:51.000Z | # Copyright 2017 Red Hat, Inc. <http://www.redhat.com>
#
# 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 b... | 40.753425 | 78 | 0.743193 |
502f6109a3a684baefcd13925e63aa3cf73c0b10 | 515 | py | Python | count words problem/count_words.py | silasjimmy/Machine-Learning-course | f80e98919c982f73f66f0d8a4af8ebffaf7c8e43 | [
"MIT"
] | null | null | null | count words problem/count_words.py | silasjimmy/Machine-Learning-course | f80e98919c982f73f66f0d8a4af8ebffaf7c8e43 | [
"MIT"
] | null | null | null | count words problem/count_words.py | silasjimmy/Machine-Learning-course | f80e98919c982f73f66f0d8a4af8ebffaf7c8e43 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 21 08:20:55 2021
@author: silasjimmy
"""
if __name__ == '__main__':
test_run()
| 23.409091 | 83 | 0.615534 |
502f754cdffdb05797ba5ba3fc5cba7ad3499d41 | 250 | py | Python | segitiga/hitung-luas-segitiga.py | Yurimahendra/latihan-big-data | 5ea495bc1187c4d99a83654f8377d73e72eb63d2 | [
"MIT"
] | null | null | null | segitiga/hitung-luas-segitiga.py | Yurimahendra/latihan-big-data | 5ea495bc1187c4d99a83654f8377d73e72eb63d2 | [
"MIT"
] | null | null | null | segitiga/hitung-luas-segitiga.py | Yurimahendra/latihan-big-data | 5ea495bc1187c4d99a83654f8377d73e72eb63d2 | [
"MIT"
] | null | null | null | # jumlah segitiga
n = 123
# panjang alas sebuah segitiga
alas = 30
# tinggi sebuah segitiga
tinggi = 18
# hitung luas sebuah segitiga
luas = alas * tinggi * 1/2
# hitung luas total
luastotal = n * luas
print('luas total : ', luastotal,'satuan luas') | 20.833333 | 47 | 0.716 |
5031531e9f322bfee275b72a63ab6ef16dc37f80 | 4,210 | py | Python | pygooglehomenotifier/googlehomenotifier.py | k-sh/pygooglehomenotifier | b1e405d1813be049506119f9abb3145d18620217 | [
"MIT"
] | null | null | null | pygooglehomenotifier/googlehomenotifier.py | k-sh/pygooglehomenotifier | b1e405d1813be049506119f9abb3145d18620217 | [
"MIT"
] | null | null | null | pygooglehomenotifier/googlehomenotifier.py | k-sh/pygooglehomenotifier | b1e405d1813be049506119f9abb3145d18620217 | [
"MIT"
] | null | null | null | import queue
import textwrap
import threading
import time
import urllib.parse
import pychromecast
| 29.440559 | 91 | 0.557482 |
5033393de69a8305614d2ab29a3b1c3d9b9a9cf3 | 353 | py | Python | django_tgbot/types/userprofilephotos.py | purwowd/django-tgbot | 6712ad2e9986c0961ad402a1d2e37be39e2f5fb4 | [
"MIT"
] | 52 | 2020-04-05T11:06:21.000Z | 2022-03-21T05:29:15.000Z | django_tgbot/types/userprofilephotos.py | armanexplorer/django-tgbot | e89f34b6a25beb9473c9e162ec8c161c14cd4cd6 | [
"MIT"
] | 11 | 2020-09-02T00:24:13.000Z | 2022-03-22T06:09:36.000Z | django_tgbot/types/userprofilephotos.py | armanexplorer/django-tgbot | e89f34b6a25beb9473c9e162ec8c161c14cd4cd6 | [
"MIT"
] | 14 | 2020-09-01T23:31:54.000Z | 2022-01-30T07:03:52.000Z | from . import BasicType
from . import photosize
UserProfilePhotos.fields.update({
'photos': {
'class': photosize.PhotoSize,
'array_of_array': True
}
}) | 17.65 | 52 | 0.634561 |
50346253e5a2a4c18cf434df1441cd57e84a1e8f | 8,171 | py | Python | pyexocross/exomol/exomoldef.py | ucl-exoplanets/pyexocross | 703341cd0fddafcbb04e935c89ddc9d02dda9f59 | [
"BSD-3-Clause"
] | null | null | null | pyexocross/exomol/exomoldef.py | ucl-exoplanets/pyexocross | 703341cd0fddafcbb04e935c89ddc9d02dda9f59 | [
"BSD-3-Clause"
] | null | null | null | pyexocross/exomol/exomoldef.py | ucl-exoplanets/pyexocross | 703341cd0fddafcbb04e935c89ddc9d02dda9f59 | [
"BSD-3-Clause"
] | 1 | 2021-01-15T12:54:04.000Z | 2021-01-15T12:54:04.000Z | from taurex.log import Logger
def generate_exomolbroadener(self, filename=None):
from .exomolbroads import ExomolBroadener
return ExomolBroadener(self._default_gamma, self._default_n,label_defs=self._quanta,filename=filename)
class ExomolDef(Logger):
def create_broadeners(s... | 30.602996 | 110 | 0.572268 |
50347b2a42cf82e77fe67d54a2ea1039a74341ec | 2,374 | py | Python | web_parsers/parsers/base.py | invanalabs/web-parser | dca9c6354317ec7187f46fd270092372b39f63f8 | [
"Apache-2.0"
] | 1 | 2019-10-06T23:11:32.000Z | 2019-10-06T23:11:32.000Z | web_parsers/parsers/base.py | crawlerflow/extraction-engine | dca9c6354317ec7187f46fd270092372b39f63f8 | [
"Apache-2.0"
] | 2 | 2020-03-11T09:33:03.000Z | 2020-03-18T21:12:28.000Z | web_parsers/parsers/base.py | crawlerflow/extraction-engine | dca9c6354317ec7187f46fd270092372b39f63f8 | [
"Apache-2.0"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
| 34.911765 | 102 | 0.613311 |
503945544f0f8af4e632fde69205e3dc522fc1a7 | 562 | py | Python | kolejka/judge/tasks/list_files.py | zielinskit/kolejka-judge | 571df05b12c5a4748d7a2ca4c217b0042acf6b48 | [
"MIT"
] | null | null | null | kolejka/judge/tasks/list_files.py | zielinskit/kolejka-judge | 571df05b12c5a4748d7a2ca4c217b0042acf6b48 | [
"MIT"
] | null | null | null | kolejka/judge/tasks/list_files.py | zielinskit/kolejka-judge | 571df05b12c5a4748d7a2ca4c217b0042acf6b48 | [
"MIT"
] | null | null | null | import glob
import itertools
from functools import partial
from typing import Tuple, Optional
from kolejka.judge.tasks.base import TaskBase
| 29.578947 | 104 | 0.729537 |
50395cf2321c71ca4f29379c96be1b850b7822ca | 5,775 | py | Python | backend/server/server.py | dballesteros7/starthack2016 | 98866b865dcb3c1b307d8119f7d2defb234f30ae | [
"MIT"
] | null | null | null | backend/server/server.py | dballesteros7/starthack2016 | 98866b865dcb3c1b307d8119f7d2defb234f30ae | [
"MIT"
] | 6 | 2021-03-18T20:16:38.000Z | 2022-01-13T00:37:14.000Z | backend/server/server.py | dballesteros7/starthack2016 | 98866b865dcb3c1b307d8119f7d2defb234f30ae | [
"MIT"
] | null | null | null | import os
import json
from flask_sqlalchemy import SQLAlchemy
from flask import Flask, request, jsonify
from flask.views import MethodView
from flask.ext.cors import CORS
from database import ElasticStorage, RedisClient
from article import Article as ESArticle
app = Flask(__name__)
CORS(app)
#sql_config = json.loads(... | 34.580838 | 145 | 0.638615 |
503a4dd6e2152629bf0d68bcf2540e064a59c3ca | 9,738 | py | Python | py/qaviton/scripts/create.py | qaviton/qaviton | 112f1620af36e09031909bd36b7e388df577b75b | [
"Apache-2.0"
] | 9 | 2018-09-06T10:27:55.000Z | 2020-01-02T16:50:13.000Z | py/qaviton/scripts/create.py | qaviton/qaviton | 112f1620af36e09031909bd36b7e388df577b75b | [
"Apache-2.0"
] | 6 | 2019-06-05T09:44:21.000Z | 2022-03-11T23:26:41.000Z | py/qaviton/scripts/create.py | qaviton/qaviton | 112f1620af36e09031909bd36b7e388df577b75b | [
"Apache-2.0"
] | 9 | 2018-09-21T14:47:40.000Z | 2021-12-21T01:37:20.000Z | import os
from qaviton.utils import filer
from qaviton.utils import path
from qaviton.utils.operating_system import s
from qaviton.version import __version__
cwd = os.getcwd()
examples = path.of(__file__)('examples')
# TODO: add more content for different frameworks
| 38.952 | 155 | 0.377798 |
503ad6eb037cd02695fc6926af71b16de0a8bd4c | 1,178 | py | Python | fpga_isp/debayer/base.py | antmicro/fpga-isp-core | 1b5e1323d9c2938758d230929c8ebcdd039fb603 | [
"Apache-2.0"
] | 4 | 2021-10-30T06:29:15.000Z | 2022-02-24T04:09:58.000Z | fpga_isp/debayer/base.py | antmicro/fpga-isp-core | 1b5e1323d9c2938758d230929c8ebcdd039fb603 | [
"Apache-2.0"
] | null | null | null | fpga_isp/debayer/base.py | antmicro/fpga-isp-core | 1b5e1323d9c2938758d230929c8ebcdd039fb603 | [
"Apache-2.0"
] | 1 | 2022-02-17T19:17:12.000Z | 2022-02-17T19:17:12.000Z | from migen import *
import math
from litex.soc.interconnect.csr import *
from litex.soc.interconnect import stream
| 31.837838 | 76 | 0.589134 |
503af92f2305932f6fb09b877f2e4fef0e54bb66 | 10,341 | py | Python | tests/pipeline/test_buyback_auth.py | colin1alexander/zipline | ba42e6d8b972dcce9271526562ceff0cddd3fa30 | [
"Apache-2.0"
] | null | null | null | tests/pipeline/test_buyback_auth.py | colin1alexander/zipline | ba42e6d8b972dcce9271526562ceff0cddd3fa30 | [
"Apache-2.0"
] | null | null | null | tests/pipeline/test_buyback_auth.py | colin1alexander/zipline | ba42e6d8b972dcce9271526562ceff0cddd3fa30 | [
"Apache-2.0"
] | null | null | null | """
Tests for the reference loader for Buyback Authorizations.
"""
from functools import partial
from unittest import TestCase
import blaze as bz
from blaze.compute.core import swap_resources_into_scope
from contextlib2 import ExitStack
import pandas as pd
from six import iteritems
from zipline.pipeline.common import... | 36.031359 | 78 | 0.619089 |
503b91f3eae562c97ebece22cef6e50c66f5a795 | 1,534 | py | Python | learnMongo/mongoInsert.py | huobingli/pyAlgorithm | cbfe3d65f7748be4f6811cb7e1897d696e914891 | [
"MIT"
] | null | null | null | learnMongo/mongoInsert.py | huobingli/pyAlgorithm | cbfe3d65f7748be4f6811cb7e1897d696e914891 | [
"MIT"
] | null | null | null | learnMongo/mongoInsert.py | huobingli/pyAlgorithm | cbfe3d65f7748be4f6811cb7e1897d696e914891 | [
"MIT"
] | null | null | null | import pymongo
from bson.objectid import ObjectId
# mongo
if __name__ == '__main__':
main() | 19.417722 | 67 | 0.527379 |
503c48b6df0fa453f16c7dbb69d69d3d798c0dc7 | 4,608 | py | Python | gerrymander/operations.py | agx/gerrymander | ffa74828fdd9bae0aa46ec121dfbb1d999a86d31 | [
"Apache-2.0"
] | 1 | 2015-09-12T20:52:10.000Z | 2015-09-12T20:52:10.000Z | gerrymander/operations.py | russellb/gerrymander | 88d3a43dbc18592225619b88ce93cd88d6137a08 | [
"Apache-2.0"
] | null | null | null | gerrymander/operations.py | russellb/gerrymander | 88d3a43dbc18592225619b88ce93cd88d6137a08 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2014 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 31.346939 | 80 | 0.560547 |
503d90e6d1ab557f77cc0650d1a8e779ce8b91c4 | 2,130 | py | Python | main.py | pystokes/mnist | ad63158bb53bd7f85c531f708936684edb5b7bd0 | [
"MIT"
] | null | null | null | main.py | pystokes/mnist | ad63158bb53bd7f85c531f708936684edb5b7bd0 | [
"MIT"
] | 2 | 2021-06-08T20:51:12.000Z | 2022-03-12T00:12:22.000Z | main.py | pystokes/mnist | ad63158bb53bd7f85c531f708936684edb5b7bd0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime as dt
import json
from pathlib import Path
import torch
import torch.nn as nn
from torch import optim
from libs.data_loader import create_mnist_data_loader
from libs.model import CNN
from libs.trainer import train, test
if __name__ == '__main__':
fro... | 32.272727 | 220 | 0.618779 |
503e0e96506950e6497e6cb13686d145c5a53e90 | 2,029 | py | Python | ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/status_params.py | kennyballou/ambari | 8985bcf11296d540a861a8634c17d6b9b1accd5a | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/status_params.py | kennyballou/ambari | 8985bcf11296d540a861a8634c17d6b9b1accd5a | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/status_params.py | kennyballou/ambari | 8985bcf11296d540a861a8634c17d6b9b1accd5a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
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");... | 41.408163 | 87 | 0.760473 |
503e2e5fa5da5155bca173a661a3c68a6802e6ed | 2,917 | py | Python | src/pyuwds3/types/vector/scalar_stable.py | LAAS-HRI/uwds3 | 42390f62ed5701a32710341b01faa10efc448078 | [
"MIT"
] | 2 | 2020-08-19T06:15:14.000Z | 2021-05-23T09:55:18.000Z | src/pyuwds3/types/vector/scalar_stable.py | LAAS-HRI/uwds3 | 42390f62ed5701a32710341b01faa10efc448078 | [
"MIT"
] | 5 | 2021-01-06T09:00:35.000Z | 2021-01-20T13:22:19.000Z | src/pyuwds3/types/vector/scalar_stable.py | LAAS-HRI/uwds3 | 42390f62ed5701a32710341b01faa10efc448078 | [
"MIT"
] | 2 | 2020-11-18T17:34:43.000Z | 2021-05-23T16:14:17.000Z | import rospy
import numpy as np
import cv2
| 31.031915 | 77 | 0.567707 |
5041193e8af88157d4069d70c71b97131486c9cc | 14,399 | py | Python | drest/api.py | derks/drest | 7e35375ffd884c3c124dc800f94c2f271d788e0f | [
"BSD-3-Clause"
] | 9 | 2015-03-10T00:41:54.000Z | 2020-05-07T06:03:22.000Z | drest/api.py | derks/drest | 7e35375ffd884c3c124dc800f94c2f271d788e0f | [
"BSD-3-Clause"
] | null | null | null | drest/api.py | derks/drest | 7e35375ffd884c3c124dc800f94c2f271d788e0f | [
"BSD-3-Clause"
] | null | null | null | """dRest core API connection library."""
import re
from . import interface, resource, request, serialization, meta, exc
from . import response
| 33.177419 | 155 | 0.562678 |
504170f7d179aab0a2ca38addb3c52b1e0a07920 | 519 | py | Python | ExIt/Expert/BaseExpert.py | LarsChrWiik/Expert-Iteration-Algorithmic-Comparison | daed2972159c451be19892ee31c413d60dd2f987 | [
"MIT"
] | 1 | 2019-03-01T15:46:06.000Z | 2019-03-01T15:46:06.000Z | ExIt/Expert/BaseExpert.py | LarsChrWiik/Expert-Iteration | daed2972159c451be19892ee31c413d60dd2f987 | [
"MIT"
] | null | null | null | ExIt/Expert/BaseExpert.py | LarsChrWiik/Expert-Iteration | daed2972159c451be19892ee31c413d60dd2f987 | [
"MIT"
] | null | null | null |
from ExIt.Apprentice import BaseApprentice
from Games.GameLogic import BaseGame
| 32.4375 | 102 | 0.722543 |
5044725258a6a777f86c0f33b6d96e0f8f308a62 | 1,235 | py | Python | monasca_common/kafka_lib/partitioner/base.py | zhangjm12/monasca-common | 2ebc766534eba6163e98b94a1f114ece18739fff | [
"Apache-2.0"
] | 26 | 2015-10-18T02:54:54.000Z | 2022-02-15T01:36:41.000Z | monasca_common/kafka_lib/partitioner/base.py | zhangjm12/monasca-common | 2ebc766534eba6163e98b94a1f114ece18739fff | [
"Apache-2.0"
] | 18 | 2019-11-01T13:03:36.000Z | 2022-02-16T02:28:52.000Z | monasca_common/kafka_lib/partitioner/base.py | zhangjm12/monasca-common | 2ebc766534eba6163e98b94a1f114ece18739fff | [
"Apache-2.0"
] | 22 | 2016-06-01T11:47:17.000Z | 2020-02-11T14:41:45.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 33.378378 | 77 | 0.680972 |
50454b178e9245d647f837e2ff8ebec1f13577e5 | 1,937 | py | Python | tests/test_options.py | inmanta/pytest-inmanta | 201a505f56b5a3c8acbcdc6d22f9f5329630c96a | [
"Apache-2.0"
] | null | null | null | tests/test_options.py | inmanta/pytest-inmanta | 201a505f56b5a3c8acbcdc6d22f9f5329630c96a | [
"Apache-2.0"
] | 59 | 2018-09-17T07:51:35.000Z | 2022-03-29T07:39:20.000Z | tests/test_options.py | inmanta/pytest-inmanta | 201a505f56b5a3c8acbcdc6d22f9f5329630c96a | [
"Apache-2.0"
] | 1 | 2019-08-07T14:38:57.000Z | 2019-08-07T14:38:57.000Z | """
Copyright 2020 Inmanta
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 ... | 33.396552 | 85 | 0.717088 |
5046b56a13dbb3b70b3975b8d94901defe4984ac | 7,798 | py | Python | PyFSM/pyfsm/elements/state_unit_tests.py | wafec/wafec-py-fsm | 444b7b797411daa3186cf812535a660404951d00 | [
"MIT"
] | null | null | null | PyFSM/pyfsm/elements/state_unit_tests.py | wafec/wafec-py-fsm | 444b7b797411daa3186cf812535a660404951d00 | [
"MIT"
] | null | null | null | PyFSM/pyfsm/elements/state_unit_tests.py | wafec/wafec-py-fsm | 444b7b797411daa3186cf812535a660404951d00 | [
"MIT"
] | null | null | null | import unittest
from pyfsm.elements import *
| 35.445455 | 112 | 0.616184 |
5047525ddbf466e6c5243baf4d5f52864154f60d | 8,117 | py | Python | data_extraction.py | Qnouro/Gdelt-analysis | e24fb316a1458d51ceb4cf1ccca71b7395235b61 | [
"MIT"
] | 6 | 2020-10-09T16:15:12.000Z | 2022-02-17T02:04:13.000Z | data_extraction.py | Qnouro/Gdelt-analysis | e24fb316a1458d51ceb4cf1ccca71b7395235b61 | [
"MIT"
] | 2 | 2020-10-09T18:26:10.000Z | 2020-10-09T22:31:34.000Z | data_extraction.py | Qnouro/Gdelt-analysis | e24fb316a1458d51ceb4cf1ccca71b7395235b61 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import sqlite3
import pandas as pd
import numpy as np
from scraper import create_data_folder, read_config
from collections import OrderedDict
def main():
"""
Mainly for debugging purposes.
"""
config_file = read_config()
# Pick a file
try:
c... | 39.21256 | 246 | 0.668104 |
5047aacc39f41b71f725e5f24c6849454e495033 | 7,799 | py | Python | predict_with_ssd7.py | esp32wrangler/ssd_keras | 632024599764a16b4791ce4a705f84273c6f7896 | [
"Apache-2.0"
] | null | null | null | predict_with_ssd7.py | esp32wrangler/ssd_keras | 632024599764a16b4791ce4a705f84273c6f7896 | [
"Apache-2.0"
] | null | null | null | predict_with_ssd7.py | esp32wrangler/ssd_keras | 632024599764a16b4791ce4a705f84273c6f7896 | [
"Apache-2.0"
] | null | null | null | from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau, TerminateOnNaN, CSVLogger
from keras import backend as K
from keras.models import load_model
from math import ceil
import numpy as np
from matplotlib import pyplot as plt
from models.keras_ssd7 import build... | 44.3125 | 297 | 0.649186 |
504917355b6cf7fd121b21c62bef31888fe9fbc3 | 29 | py | Python | deploy/__init__.py | gaocegege/treadmill | 04325d319c0ee912c066f07b88b674e84485f154 | [
"Apache-2.0"
] | 2 | 2017-03-20T07:13:33.000Z | 2017-05-03T03:39:53.000Z | deploy/__init__.py | gaocegege/treadmill | 04325d319c0ee912c066f07b88b674e84485f154 | [
"Apache-2.0"
] | 12 | 2017-07-10T07:04:06.000Z | 2017-07-26T09:32:54.000Z | deploy/__init__.py | gaocegege/treadmill | 04325d319c0ee912c066f07b88b674e84485f154 | [
"Apache-2.0"
] | 2 | 2017-05-04T11:25:32.000Z | 2017-07-11T09:10:01.000Z | """Ansible playbooks init"""
| 14.5 | 28 | 0.689655 |
5049af1e05d73fa6840cb3f92f972bafd2d50cac | 12,339 | py | Python | a1/ANN.py | mishless/LearningSystems | 635d9af9d00ae0360d7ca8571bf47f782fdcdfe9 | [
"MIT"
] | 1 | 2021-08-01T03:30:49.000Z | 2021-08-01T03:30:49.000Z | a1/ANN.py | mishless/LearningSystems | 635d9af9d00ae0360d7ca8571bf47f782fdcdfe9 | [
"MIT"
] | null | null | null | a1/ANN.py | mishless/LearningSystems | 635d9af9d00ae0360d7ca8571bf47f782fdcdfe9 | [
"MIT"
] | null | null | null | #Artificial Neural Network
#includes
import configparser
import math
import matplotlib.pyplot as plt
import numpy as np
import random
from decimal import *
#global variables
weights = [];
topology = [];
data_training = [];
data_test = [];
learning_rate = 0;
weight_min = 0;
weight_max = 0;
error_terms = [];
outputs =... | 31.557545 | 146 | 0.606775 |
504a5158dee21a88d36bd8c0ab457b382a4195ba | 143 | py | Python | Python/CodingBat/string_times.py | dvt32/cpp-journey | afd7db7a1ad106c41601fb09e963902187ae36e6 | [
"MIT"
] | 1 | 2018-05-24T11:30:05.000Z | 2018-05-24T11:30:05.000Z | Python/CodingBat/string_times.py | dvt32/cpp-journey | afd7db7a1ad106c41601fb09e963902187ae36e6 | [
"MIT"
] | null | null | null | Python/CodingBat/string_times.py | dvt32/cpp-journey | afd7db7a1ad106c41601fb09e963902187ae36e6 | [
"MIT"
] | 2 | 2017-08-11T06:53:30.000Z | 2017-08-29T12:07:52.000Z | # http://codingbat.com/prob/p193507
| 14.3 | 35 | 0.601399 |
504a8a1f14c3de8780d56a229c744af8d53c9b27 | 262 | py | Python | app/service/plugin_svc.py | muyenzo/caldera | 408f6d54239aa73832f474136ac8f64faab5be35 | [
"Apache-2.0"
] | null | null | null | app/service/plugin_svc.py | muyenzo/caldera | 408f6d54239aa73832f474136ac8f64faab5be35 | [
"Apache-2.0"
] | null | null | null | app/service/plugin_svc.py | muyenzo/caldera | 408f6d54239aa73832f474136ac8f64faab5be35 | [
"Apache-2.0"
] | null | null | null | from app.service.base_service import BaseService
| 21.833333 | 55 | 0.698473 |
504a9f6ead52901b47b1d2e2ebcb578f28c594cc | 3,709 | py | Python | tests/node_io/test_ethernet.py | SpiNNakerManchester/nengo_spinnaker | 147e2b3d6c0965259d6897f177f23e5c99b184f9 | [
"MIT"
] | 13 | 2015-06-10T08:58:05.000Z | 2022-03-29T08:20:14.000Z | tests/node_io/test_ethernet.py | SpiNNakerManchester/nengo_spinnaker | 147e2b3d6c0965259d6897f177f23e5c99b184f9 | [
"MIT"
] | 131 | 2015-04-16T15:17:12.000Z | 2020-06-19T05:38:56.000Z | tests/node_io/test_ethernet.py | SpiNNakerManchester/nengo_spinnaker | 147e2b3d6c0965259d6897f177f23e5c99b184f9 | [
"MIT"
] | 7 | 2015-07-01T00:01:50.000Z | 2018-06-28T10:12:18.000Z | import nengo
import pytest
from nengo_spinnaker.builder import Model
from nengo_spinnaker.builder.ports import OutputPort, InputPort
from nengo_spinnaker.node_io import ethernet as ethernet_io
from nengo_spinnaker.operators import SDPReceiver, SDPTransmitter
def test_get_spinnaker_source_for_node():
"""Check th... | 34.027523 | 78 | 0.701267 |
504ae56ee7d72c3c28a102b8af0d776ce3b43014 | 59,138 | py | Python | aliyun/log/logclient.py | SeraphLiu/aliyun-log-sdk-python | 35f608bd6de9f5ed7a89c40288c550cfc3bea8ba | [
"BSD-3-Clause"
] | null | null | null | aliyun/log/logclient.py | SeraphLiu/aliyun-log-sdk-python | 35f608bd6de9f5ed7a89c40288c550cfc3bea8ba | [
"BSD-3-Clause"
] | null | null | null | aliyun/log/logclient.py | SeraphLiu/aliyun-log-sdk-python | 35f608bd6de9f5ed7a89c40288c550cfc3bea8ba | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# Copyright (C) Alibaba Cloud Computing
# All rights reserved.
import sys
import requests
try:
import json
except ImportError:
import simplejson as json
try :
import logservice_lz4
except ImportError:
pass
from datetime import datetime
from... | 36.325553 | 183 | 0.615543 |
504b5c677cc47a60e5d73108185305ec18d1d8d6 | 489 | py | Python | CodeWars/Python/AlternateCase.py | BobbyRobillard/CodingChallenges | 71d5ca0b7f7c470c547d858dde7a799ce7d0d1a0 | [
"MIT"
] | null | null | null | CodeWars/Python/AlternateCase.py | BobbyRobillard/CodingChallenges | 71d5ca0b7f7c470c547d858dde7a799ce7d0d1a0 | [
"MIT"
] | null | null | null | CodeWars/Python/AlternateCase.py | BobbyRobillard/CodingChallenges | 71d5ca0b7f7c470c547d858dde7a799ce7d0d1a0 | [
"MIT"
] | null | null | null |
# EXAMPLE AND TESTING #
input = ["Hello World", "cODEwARS"]
for item in input:
print("\nInput: {0}\nAlternate Case: {1}".format(item, alternate_case(item)))
assert alternate_case("Hello World") == "hELLO wORLD" # Simple Unit Tests
assert alternate_case("cODEwARS") == "CodeWars" # Simple Unit Tests
| 30.5625 | 84 | 0.672802 |
504ca1ede2e47eb980188d865fd66a3fa14bb848 | 729 | py | Python | todoist_python_additions/scripts/personal.py | aagnone3/todoist-python-additions | 56bfe6e0160fd28ba0b3b04f4f156b89d4512c2f | [
"Apache-2.0"
] | null | null | null | todoist_python_additions/scripts/personal.py | aagnone3/todoist-python-additions | 56bfe6e0160fd28ba0b3b04f4f156b89d4512c2f | [
"Apache-2.0"
] | null | null | null | todoist_python_additions/scripts/personal.py | aagnone3/todoist-python-additions | 56bfe6e0160fd28ba0b3b04f4f156b89d4512c2f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import todoist
import pickle
from os import path
from argparse import ArgumentParser
from todoist_python_additions.lib.state import Todoist
if __name__ == '__main__':
main()
| 22.78125 | 101 | 0.643347 |
504e0deae6fdb470fcb220ab052c73d97c382d30 | 636 | py | Python | recipe_server/recipeView.py | Shouyin/Recipe | dffaafdebefd7c39a1438444db910f5d7943cf1f | [
"MIT"
] | null | null | null | recipe_server/recipeView.py | Shouyin/Recipe | dffaafdebefd7c39a1438444db910f5d7943cf1f | [
"MIT"
] | null | null | null | recipe_server/recipeView.py | Shouyin/Recipe | dffaafdebefd7c39a1438444db910f5d7943cf1f | [
"MIT"
] | null | null | null | from django import http
from django.shortcuts import render
from django.shortcuts import render_to_response
from . import settings
from .scripts import logic
import os
import urllib
import json
| 28.909091 | 70 | 0.751572 |
504e2922325d5c9d9b0ab7cf89788990779e8e47 | 296 | py | Python | ua_project_transfer/wf_steps_template.py | UACoreFacilitiesIT/UA-Project_Transfer | 0360f20f54a6c9c49dcdb1568a1c961222cb1404 | [
"MIT"
] | 1 | 2020-07-14T16:27:25.000Z | 2020-07-14T16:27:25.000Z | ua_project_transfer/wf_steps_template.py | UACoreFacilitiesIT/UA-Project_Transfer | 0360f20f54a6c9c49dcdb1568a1c961222cb1404 | [
"MIT"
] | null | null | null | ua_project_transfer/wf_steps_template.py | UACoreFacilitiesIT/UA-Project_Transfer | 0360f20f54a6c9c49dcdb1568a1c961222cb1404 | [
"MIT"
] | null | null | null | """A json-like master list of workflows and steps."""
# NOTE: Create a json-like dictionary in the form of:
# WF_STEPS = {
# env1: {
# 1st condition defined in next_steps: {
# 2nd condition defined in next_steps: (Workflow Name, Step Name),
# },
# },
# }
WF_STEPS = {}
| 24.666667 | 76 | 0.608108 |
504f7132a6b57d1fc297a4a0f887b07196d4dbf4 | 250 | py | Python | lang/python/pptv_strip.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/python/pptv_strip.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/python/pptv_strip.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | import sys
fn = sys.argv[1]
fp = open(fn)
fo = open(fn+".flv","wb")
data = fp.read()
offset = int(sys.argv[2])
if len(sys.argv)==3:
fo.write(data[offset:])
else:
l = int(sys.argsv[3])
fo.write(data[offset:offset+l])
fo.close()
fp.close()
| 17.857143 | 35 | 0.608 |
5050238035d838d374850823b3ad1446226e79b5 | 329 | py | Python | tools/exploitation_tools.py | LucaRibeiro/pentestools | 2e7a6b9bf51a84aec90944c50a23e882d184ccdc | [
"MIT"
] | 1 | 2021-02-18T16:15:25.000Z | 2021-02-18T16:15:25.000Z | tools/exploitation_tools.py | LucaRibeiro/Pentools | 2e7a6b9bf51a84aec90944c50a23e882d184ccdc | [
"MIT"
] | null | null | null | tools/exploitation_tools.py | LucaRibeiro/Pentools | 2e7a6b9bf51a84aec90944c50a23e882d184ccdc | [
"MIT"
] | null | null | null | #!/usr/bin/python3
list = ["Armitage", "Backdoor Factory", "BeEF","cisco-auditing-tool",
"cisco-global-exploiter","cisco-ocs","cisco-torch","Commix","crackle",
"exploitdb","jboss-autopwn","Linux Exploit Suggester","Maltego Teeth",
"Metasploit Framework","MSFPC","RouterSploit","SET","ShellNoob","sqlmap",
"THC-IPV6","Ye... | 41.125 | 73 | 0.714286 |
50530270ca9767c3a423e4f06bb397a9db26bf9c | 1,152 | py | Python | web/api/serializer/foodComment.py | bounswe/bounswe2016group2 | f5dbba9b78fc03e8fd6a1fc7548de6cd1177a5ad | [
"Apache-2.0"
] | 10 | 2016-02-10T13:57:10.000Z | 2021-04-01T14:34:33.000Z | web/api/serializer/foodComment.py | bounswe/bounswe2016group2 | f5dbba9b78fc03e8fd6a1fc7548de6cd1177a5ad | [
"Apache-2.0"
] | 203 | 2016-02-14T16:13:15.000Z | 2016-12-23T21:27:08.000Z | web/api/serializer/foodComment.py | bounswe/bounswe2016group2 | f5dbba9b78fc03e8fd6a1fc7548de6cd1177a5ad | [
"Apache-2.0"
] | 2 | 2017-05-10T18:41:28.000Z | 2019-02-27T21:01:18.000Z | from rest_framework import serializers
from api.model.foodComment import FoodComment
from api.model.food import Food
from django.contrib.auth.models import User
from api.serializer.user import UserSerializer
| 27.428571 | 82 | 0.730903 |
50546bf4b57d2a73845feae541d069b7a6fc01c7 | 616 | py | Python | pycccl/exchanges/binance.py | beraldoleal/pycccl | 488bc799fdd91b626c2735be11ad014f0c5262f4 | [
"MIT"
] | 2 | 2017-12-18T23:58:56.000Z | 2020-02-13T16:16:45.000Z | pycccl/exchanges/binance.py | beraldoleal/pycccl | 488bc799fdd91b626c2735be11ad014f0c5262f4 | [
"MIT"
] | null | null | null | pycccl/exchanges/binance.py | beraldoleal/pycccl | 488bc799fdd91b626c2735be11ad014f0c5262f4 | [
"MIT"
] | null | null | null | from pycccl.base import ExchangeBase
| 36.235294 | 65 | 0.608766 |
505794ef4686ee28ab927b92a5720e1b1a514e5a | 3,036 | py | Python | features/feature_helpers.py | Omarzintan/bumblebee-ai | 0b8c5cecf032730e23b1b710a88538f5e4ea70c9 | [
"MIT"
] | 3 | 2021-05-06T16:29:26.000Z | 2022-01-09T03:32:40.000Z | features/feature_helpers.py | Omarzintan/bumblebee-ai | 0b8c5cecf032730e23b1b710a88538f5e4ea70c9 | [
"MIT"
] | 1 | 2021-05-20T17:59:12.000Z | 2021-05-20T17:59:12.000Z | features/feature_helpers.py | Omarzintan/bumblebee-ai | 0b8c5cecf032730e23b1b710a88538f5e4ea70c9 | [
"MIT"
] | null | null | null | '''Contains helper functions that can be used by any feature.'''
from nltk_utils import tokenize
def get_search_query(
spoken_text,
patterns,
search_terms,
false_search_term_indicators=['like', 'love', 'want', 'ready']
):
'''
General function that extracts a search query from spoken
text g... | 38.43038 | 78 | 0.641634 |
5058a081df1dc931f3e41294a65ae1da77668e15 | 1,042 | py | Python | tests/core/test_machine.py | zionwu/rancher | f3e80f69e94d7da64e75545caadda61870148753 | [
"Apache-2.0"
] | null | null | null | tests/core/test_machine.py | zionwu/rancher | f3e80f69e94d7da64e75545caadda61870148753 | [
"Apache-2.0"
] | null | null | null | tests/core/test_machine.py | zionwu/rancher | f3e80f69e94d7da64e75545caadda61870148753 | [
"Apache-2.0"
] | 1 | 2021-07-13T05:49:57.000Z | 2021-07-13T05:49:57.000Z | from common import auth_check
| 25.414634 | 78 | 0.487524 |
505a515d4a168bd3da730d0e4d81ce61082b150d | 1,764 | py | Python | tempest/lib/services/placement/base_placement_client.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 254 | 2015-01-05T19:22:52.000Z | 2022-03-29T08:14:54.000Z | tempest/lib/services/placement/base_placement_client.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 13 | 2015-03-02T15:53:04.000Z | 2022-02-16T02:28:14.000Z | tempest/lib/services/placement/base_placement_client.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 367 | 2015-01-07T15:05:39.000Z | 2022-03-04T09:50:35.000Z | # Copyright (c) 2019 Ericsson
#
# 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 agree... | 40.090909 | 78 | 0.709751 |
505ba5b3fd5ef3def46cb59aa349536857d79a09 | 6,743 | py | Python | Telegram Bot/Controllo_intenti.py | LuzDeGea/FoodHelper | 2b4ad1b731f605c1aaf92863d8dc69ee9e9a1599 | [
"MIT"
] | null | null | null | Telegram Bot/Controllo_intenti.py | LuzDeGea/FoodHelper | 2b4ad1b731f605c1aaf92863d8dc69ee9e9a1599 | [
"MIT"
] | null | null | null | Telegram Bot/Controllo_intenti.py | LuzDeGea/FoodHelper | 2b4ad1b731f605c1aaf92863d8dc69ee9e9a1599 | [
"MIT"
] | null | null | null | from Dialogflow_Api import rispondimi
from collegamentoSito import inserisci_utente
from Nutrition import get_food, traduzione
import re
tipo_cibo = ["frutta", "carne", "verdure", "ortaggi", "primi_piatti", "legumi"]
"""
controllo_intent(query_result, utente)--> text_respose
prende il risultato della query e lo confr... | 34.757732 | 114 | 0.667655 |
505bbd3722c72235b1e0bdbc9e5ed0fb5d0411eb | 780 | py | Python | solutions/problem_122.py | ksvr444/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 1,921 | 2018-11-13T18:19:56.000Z | 2021-11-15T14:25:41.000Z | solutions/problem_122.py | MohitIndian/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 2 | 2019-07-19T01:06:16.000Z | 2019-08-01T22:21:36.000Z | solutions/problem_122.py | MohitIndian/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 1,066 | 2018-11-19T19:06:55.000Z | 2021-11-13T12:33:56.000Z |
coins = [[0, 3, 1, 1],
[2, 0, 0, 4],
[1, 5, 3, 1]]
assert get_max_coins(coins) == 12
coins = [[0, 3, 1, 1],
[2, 8, 9, 4],
[1, 5, 3, 1]]
assert get_max_coins(coins) == 25
| 23.636364 | 57 | 0.534615 |
505c47079444405aa3ca837c5da8f814a93cab97 | 1,745 | py | Python | examples/GANs/3DGAN/eval.py | Tarkiyah/kaotlin | 97374f648a53f6532f2348ca3f9ace943c4e2a4c | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-11-18T05:22:15.000Z | 2020-02-12T15:23:14.000Z | examples/GANs/3DGAN/eval.py | AOE-khkhan/kaolin | ed132736421ee723d14d59eaeb0286a8916a159d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/GANs/3DGAN/eval.py | AOE-khkhan/kaolin | ed132736421ee723d14d59eaeb0286a8916a159d | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-11-18T13:03:53.000Z | 2019-11-18T13:03:53.000Z | # Copyright (c) 2019, NVIDIA CORPORATION. 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 applicabl... | 32.314815 | 103 | 0.755874 |
505c9ede825c6ed2e1eb8da363a465a3e5284503 | 26,526 | py | Python | camfi/annotator.py | J-Wall/camfi | feec4d5df5cdc0c4e1144ce8f85bbf6190c68be1 | [
"MIT"
] | null | null | null | camfi/annotator.py | J-Wall/camfi | feec4d5df5cdc0c4e1144ce8f85bbf6190c68be1 | [
"MIT"
] | 3 | 2021-07-01T05:41:57.000Z | 2021-11-03T01:58:15.000Z | camfi/annotator.py | J-Wall/camfi | feec4d5df5cdc0c4e1144ce8f85bbf6190c68be1 | [
"MIT"
] | 1 | 2021-09-22T13:54:54.000Z | 2021-09-22T13:54:54.000Z | """Defines procedures for training, and evaluation automatic camfi annotation models,
and for using them for making automatic annotations (inference). Depends on camfi.util,
camfi.datamodel.autoannotation, camfi.datamodel.geometry, camfi.datamode.via, as well
as ._torchutils and ._models."""
from datetime import datet... | 38.221902 | 93 | 0.64695 |
50609a1ab04ea45a8835acdab90437bf93e94353 | 1,644 | py | Python | SLpackage/private/pacbio/pythonpkgs/pbreports/lib/python2.7/site-packages/pbreports/report/laagc_input.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 5 | 2022-02-20T07:10:02.000Z | 2022-03-18T17:47:53.000Z | SLpackage/private/pacbio/pythonpkgs/pbreports/lib/python2.7/site-packages/pbreports/report/laagc_input.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | SLpackage/private/pacbio/pythonpkgs/pbreports/lib/python2.7/site-packages/pbreports/report/laagc_input.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | """
Wrapper for running amplicon_analysis_inputs report for LAAgc (with an extra
input file).
"""
import logging
import sys
from pbcommand.models import FileTypes
from pbcommand.cli import pbparser_runner
from pbcommand.utils import setup_log
from pbreports.report.amplicon_analysis_input import _get_parser, make_rep... | 27.4 | 97 | 0.670316 |
5060bae394ef43f65427b7889ebd8a488a199475 | 1,014 | py | Python | toughradius/common/event_common.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | 1 | 2019-05-12T15:06:58.000Z | 2019-05-12T15:06:58.000Z | toughradius/common/event_common.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | null | null | null | toughradius/common/event_common.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding:utf-8
from toughlib import dispatch
""","""
| 39 | 98 | 0.68146 |
5060ee963497faf44238f2e6162528f64a4e0e16 | 2,017 | py | Python | sahara/utils/openstack/nova.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | 1 | 2022-02-25T19:14:33.000Z | 2022-02-25T19:14:33.000Z | sahara/utils/openstack/nova.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | sahara/utils/openstack/nova.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 27.630137 | 69 | 0.699554 |
50632d26f7af85cd942cc29b1b5c01dae2c5c47e | 2,978 | py | Python | swim_backend/events.py | eurocontrol-swim/swim-backend | bdeba82d43b833f2fc9ef81e806d8ce0aafdb5b9 | [
"BSD-3-Clause"
] | null | null | null | swim_backend/events.py | eurocontrol-swim/swim-backend | bdeba82d43b833f2fc9ef81e806d8ce0aafdb5b9 | [
"BSD-3-Clause"
] | null | null | null | swim_backend/events.py | eurocontrol-swim/swim-backend | bdeba82d43b833f2fc9ef81e806d8ce0aafdb5b9 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright 2019 EUROCONTROL
==========================================
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions an... | 36.765432 | 121 | 0.693083 |
ac8cc54ceb3e6f1445ff8cd5bb3540d66783ed73 | 22,063 | py | Python | src/ama/validator.py | sffjunkie/ama | e05e98fb771ae783901516f882990fcc54ca0026 | [
"Apache-2.0"
] | 1 | 2019-03-21T09:50:20.000Z | 2019-03-21T09:50:20.000Z | src/ama/validator.py | sffjunkie/ama | e05e98fb771ae783901516f882990fcc54ca0026 | [
"Apache-2.0"
] | null | null | null | src/ama/validator.py | sffjunkie/ama | e05e98fb771ae783901516f882990fcc54ca0026 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2014, Simon Kennedy, sffjunkie+code@gmail.com
# pylint: disable=unused-argument
"""Provides access to a registry of validation functions.
Functions are returned via the :func:`get_validator` function and can be refined
by passing a specification which alters what passes the validation.
All validator... | 29.10686 | 91 | 0.537098 |
ac8dbd9e323eeca0d685d4a4900b4bd4b422d5be | 11,396 | py | Python | Thirdparty/libcurl/build.py | reven86/dava.engine | ca47540c8694668f79774669b67d874a30188c20 | [
"BSD-3-Clause"
] | 5 | 2020-02-11T12:04:17.000Z | 2022-01-30T10:18:29.000Z | Thirdparty/libcurl/build.py | reven86/dava.engine | ca47540c8694668f79774669b67d874a30188c20 | [
"BSD-3-Clause"
] | null | null | null | Thirdparty/libcurl/build.py | reven86/dava.engine | ca47540c8694668f79774669b67d874a30188c20 | [
"BSD-3-Clause"
] | 4 | 2019-11-28T19:24:34.000Z | 2021-08-24T19:12:50.000Z | import os
import shutil
import build_utils
| 33.616519 | 112 | 0.660495 |
ac8dff59d2ee5472682b61a81f77760f6305472b | 1,871 | py | Python | tests/test_schnell.py | damonge/SNELL | 4bb276225fce8f535619d0f2133a19f3c42aa44f | [
"BSD-3-Clause"
] | 2 | 2020-05-07T03:22:37.000Z | 2021-02-19T14:34:42.000Z | tests/test_schnell.py | damonge/SNELL | 4bb276225fce8f535619d0f2133a19f3c42aa44f | [
"BSD-3-Clause"
] | 2 | 2020-04-28T11:13:10.000Z | 2021-06-08T12:20:25.000Z | tests/test_schnell.py | damonge/GWSN | 4bb276225fce8f535619d0f2133a19f3c42aa44f | [
"BSD-3-Clause"
] | 2 | 2020-05-07T03:22:43.000Z | 2021-12-05T15:41:05.000Z | import healpy as hp
import numpy as np
from schnell import MapCalculator, GroundDetector, LISADetector
# Detectors
det1 = GroundDetector('Hanford', 46.4, -119.4, 90-171.8,
'plots/data/aLIGO_design.txt')
det2 = GroundDetector('Livingstone', 30.7, -90.8, 90-243.0,
'plots... | 36.686275 | 63 | 0.622662 |
ac8ff801eb4c39b0e7abc25a4c80f6925127a04d | 7,281 | py | Python | bittensor/wallet.py | il-dar/bittensor | 12ea83a76abc3556f42e619ed04a223c0407b9b3 | [
"MIT"
] | null | null | null | bittensor/wallet.py | il-dar/bittensor | 12ea83a76abc3556f42e619ed04a223c0407b9b3 | [
"MIT"
] | null | null | null | bittensor/wallet.py | il-dar/bittensor | 12ea83a76abc3556f42e619ed04a223c0407b9b3 | [
"MIT"
] | null | null | null |
# The MIT License (MIT)
# Copyright 2021 Opentensor.ai
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the Software), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, me... | 43.598802 | 136 | 0.641121 |
ac921c70997b850dff4ce1806e2a8f895193810b | 1,924 | py | Python | build_data/data_partitions.py | zkurtz/kaggle_malware_2019 | 72465b2f5d5f49d1acefa9b4f6b06df2aa53e4a8 | [
"MIT"
] | null | null | null | build_data/data_partitions.py | zkurtz/kaggle_malware_2019 | 72465b2f5d5f49d1acefa9b4f6b06df2aa53e4a8 | [
"MIT"
] | null | null | null | build_data/data_partitions.py | zkurtz/kaggle_malware_2019 | 72465b2f5d5f49d1acefa9b4f6b06df2aa53e4a8 | [
"MIT"
] | null | null | null | '''
Split the training data into subsets for cross validation, sample from the testing data, etc.
'''
from feather import read_dataframe as read_feather
import numpy as np
import pdb
from zpylib import data_path as dp
from zpylib import datatools
from zpylib import N_TEST
from zpylib import N_TRAIN
# Config
NGROUPS=... | 32.610169 | 95 | 0.696985 |
ac92df5c1931094331c3056c256d7646c3351e9b | 1,732 | py | Python | tests/integration/application/test_attribute_server_and_client.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2020-12-04T17:59:19.000Z | 2020-12-04T17:59:19.000Z | tests/integration/application/test_attribute_server_and_client.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | null | null | null | tests/integration/application/test_attribute_server_and_client.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2021-03-05T05:03:36.000Z | 2021-03-05T05:03:36.000Z | from predictionserver.clientmixins.attributereader import (
AttributeReader, AttributeType, AttributeGranularity
)
from predictionserver.set_config import MICRO_TEST_CONFIG
from predictionserver.servermixins.attributeserver import AttributeServer
BABLOH_CATTLE = MICRO_TEST_CONFIG['BABLOH_CATTLE']
PUBLIC_PROFILE =... | 35.346939 | 73 | 0.718822 |
ac9387393ec1679069c88ceafbe610de436150e4 | 20,187 | py | Python | aiokraken/utils/tests/test_timeindexeddataframe.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | null | null | null | aiokraken/utils/tests/test_timeindexeddataframe.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | 82 | 2019-08-30T09:37:49.000Z | 2022-03-29T14:53:22.000Z | aiokraken/utils/tests/test_timeindexeddataframe.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | null | null | null | import unittest
from datetime import datetime, timezone
from pandas import DatetimeTZDtype
from parameterized import parameterized
import pandas as pd
from aiokraken.utils.timeindexeddataframe import TimeindexedDataframe
"""
Test module.
This is intended for extensive testing, using parameterized, hypothesis or simi... | 36.904936 | 109 | 0.395849 |
ac94d7600e1dceeb8d2024e62d34864ff7ca1d58 | 2,041 | py | Python | app/models/admin.py | ShuaiGao/mini-shop-server | 8a72b2d457bba8778e97637027ffa82bfa11e8a9 | [
"MIT"
] | null | null | null | app/models/admin.py | ShuaiGao/mini-shop-server | 8a72b2d457bba8778e97637027ffa82bfa11e8a9 | [
"MIT"
] | 1 | 2019-07-08T12:32:29.000Z | 2019-07-08T12:32:29.000Z | app/models/admin.py | ShuaiGao/mini-shop-server | 8a72b2d457bba8778e97637027ffa82bfa11e8a9 | [
"MIT"
] | null | null | null | # _*_ coding: utf-8 _*_
"""
Created by Allen7D on 2018/6/16.
"""
import os.path as op
from flask_admin import Admin, BaseView, expose
from flask import render_template, redirect, url_for
from flask_admin.contrib.sqla import ModelView
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import form
fro... | 27.958904 | 78 | 0.709456 |
ac9516fa184eda7179ab54abc6a3a63da22f79c3 | 9,334 | py | Python | MKCommand.py | the-snowwhite/Machinekit-Workbench | 3e0c3ae55e67553bd599a3010ccf3a0392212333 | [
"MIT"
] | 8 | 2019-09-27T18:45:51.000Z | 2020-02-27T09:58:10.000Z | MKCommand.py | the-snowwhite/Machinekit-Workbench | 3e0c3ae55e67553bd599a3010ccf3a0392212333 | [
"MIT"
] | null | null | null | MKCommand.py | the-snowwhite/Machinekit-Workbench | 3e0c3ae55e67553bd599a3010ccf3a0392212333 | [
"MIT"
] | 3 | 2019-10-19T00:18:41.000Z | 2019-11-17T19:58:44.000Z | # Classes implementing the different commands that can be sent to MK
# The implemented classes do not cover the complete functional set of MK
# but are what is required to implement a basic UI.
import enum
import machinetalk.protobuf.message_pb2 as MESSAGE
import machinetalk.protobuf.status_pb2 as STATUS
import machi... | 42.235294 | 123 | 0.714378 |
ac9572d83ed99fc10622f825cbd2ad1d0bacc722 | 1,094 | py | Python | main.py | StewartNZ/OpenCVPython_ObjectDectection_Tut_1 | bce18fded0da0e918d6e63c9fc0c469f280c09fe | [
"MIT"
] | null | null | null | main.py | StewartNZ/OpenCVPython_ObjectDectection_Tut_1 | bce18fded0da0e918d6e63c9fc0c469f280c09fe | [
"MIT"
] | null | null | null | main.py | StewartNZ/OpenCVPython_ObjectDectection_Tut_1 | bce18fded0da0e918d6e63c9fc0c469f280c09fe | [
"MIT"
] | null | null | null | import cv2
threshold = 0.5 # Threshold to detect objects
cap = cv2.VideoCapture(0)
cap.set(3, 640)
cap.set(4, 480)
classNames = []
classFile = "coco.names"
with open(classFile, "rt") as f:
classNames = f.read().rstrip("\n").split("\n")
configPath = "ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt"
weightsPath = "f... | 29.567568 | 99 | 0.657221 |
ac9628c7fcfcaba0ff2db9009e0f62d4acc1ad33 | 4,302 | py | Python | custom_functions.py | JacopoMalatesta/letterboxd_30000 | 90df0d19cd4b5a24259a76a01780615cd6d51356 | [
"MIT"
] | null | null | null | custom_functions.py | JacopoMalatesta/letterboxd_30000 | 90df0d19cd4b5a24259a76a01780615cd6d51356 | [
"MIT"
] | null | null | null | custom_functions.py | JacopoMalatesta/letterboxd_30000 | 90df0d19cd4b5a24259a76a01780615cd6d51356 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from bs4 import BeautifulSoup
import re
import json
import numpy as np
import sys
sys.setrecursionlimit(10000)
# Write a function that parses HTML pages into BeautifulSoup objects
# In[2]:
# Film id (we need to download this again to perform a join later on)
# I... | 19.824885 | 108 | 0.552069 |
ac966bdc85252514fe041fc3a7a1ee98e28774c4 | 2,651 | py | Python | girder/molecules/molecules/models/geometry.py | bnmajor/mongochemserver | aa76ab6e7f749c3e893f27e208984b6ed2d4b2b5 | [
"BSD-3-Clause"
] | 14 | 2015-05-04T16:40:48.000Z | 2021-07-13T08:00:30.000Z | girder/molecules/molecules/models/geometry.py | bnmajor/mongochemserver | aa76ab6e7f749c3e893f27e208984b6ed2d4b2b5 | [
"BSD-3-Clause"
] | 88 | 2015-07-24T07:58:43.000Z | 2021-02-23T19:37:13.000Z | girder/molecules/molecules/models/geometry.py | bnmajor/mongochemserver | aa76ab6e7f749c3e893f27e208984b6ed2d4b2b5 | [
"BSD-3-Clause"
] | 8 | 2015-06-12T20:54:39.000Z | 2021-04-09T01:07:15.000Z | from bson.objectid import ObjectId
from girder.models.model_base import AccessControlledModel
from girder.constants import AccessType
from molecules.models.molecule import Molecule as MoleculeModel
from molecules.utilities.get_cjson_energy import get_cjson_energy
from molecules.utilities.pagination import parse_pagin... | 31.939759 | 80 | 0.634478 |
ac97d43733100708fa2b0d168201fd6612736104 | 2,185 | py | Python | GearC/material.py | cfernandesFEUP/Gear-Calculation | c15249c23f97e1168e3316ad5e27ed747758353a | [
"Unlicense"
] | 3 | 2020-09-01T13:19:10.000Z | 2021-12-13T13:59:00.000Z | GearC/material.py | cfernandesFEUP/Gear-Calculation | c15249c23f97e1168e3316ad5e27ed747758353a | [
"Unlicense"
] | null | null | null | GearC/material.py | cfernandesFEUP/Gear-Calculation | c15249c23f97e1168e3316ad5e27ed747758353a | [
"Unlicense"
] | null | null | null | ## LIBRARY OF MATERIALS #######################################################
| 46.489362 | 101 | 0.381236 |
ac9916de49ddb625f43df3193b1ae53742dad7ca | 802 | py | Python | crawler/browser/javascript.py | CvvT/crawler_sqlmap | 8cca8e8386e4b2160e2064a510b47c1202acdf39 | [
"Apache-2.0"
] | 9 | 2017-06-23T08:57:45.000Z | 2022-03-16T16:10:10.000Z | crawler/browser/javascript.py | CvvT/crawler_sqlmap | 8cca8e8386e4b2160e2064a510b47c1202acdf39 | [
"Apache-2.0"
] | 4 | 2017-06-27T10:16:52.000Z | 2018-08-24T00:47:07.000Z | crawler/browser/javascript.py | CvvT/crawler_sqlmap | 8cca8e8386e4b2160e2064a510b47c1202acdf39 | [
"Apache-2.0"
] | 3 | 2017-06-23T08:57:50.000Z | 2021-02-02T05:58:09.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = 'CwT'
# document.body.innerHTML += '<form id="dynForm" action="http://example.com/" method="post">
# <input type="hidden" name="q" value="a"></form>';
# document.getElementById("dynForm").submit();
POST_JS = '<form id=\\"dynamicform\\" action=\\"%s\\" met... | 34.869565 | 95 | 0.587282 |
ac9affe885fc3efd2cfe8bac23b5b5b2bbdd9cfc | 13,297 | py | Python | vtpl_api/models/engine_task.py | vtpl1/vtpl_api | d289c92254deb040de925205c583de69802a1c6b | [
"MIT"
] | null | null | null | vtpl_api/models/engine_task.py | vtpl1/vtpl_api | d289c92254deb040de925205c583de69802a1c6b | [
"MIT"
] | null | null | null | vtpl_api/models/engine_task.py | vtpl1/vtpl_api | d289c92254deb040de925205c583de69802a1c6b | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Engine api
Engine APIs # noqa: E501
The version of the OpenAPI document: 1.0.4
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
def to_str(self):
"""Returns the string representation of the model"""
return ... | 27.644491 | 278 | 0.590885 |
ac9bf1bc57608adb9efd17714313aca04098cd39 | 1,876 | py | Python | scripts/05_skew.py | fabiobaccarin/allstate-loss | 4c0fea6ea28847fc67b9e742dc3ac30e1ac4d10a | [
"MIT"
] | null | null | null | scripts/05_skew.py | fabiobaccarin/allstate-loss | 4c0fea6ea28847fc67b9e742dc3ac30e1ac4d10a | [
"MIT"
] | null | null | null | scripts/05_skew.py | fabiobaccarin/allstate-loss | 4c0fea6ea28847fc67b9e742dc3ac30e1ac4d10a | [
"MIT"
] | null | null | null | """
Analyses skewness for continuous features
Options:
A. Log
B. Yeo-Johnson
C. QuantileTransformer
"""
import json
import pandas as pd
import numpy as np
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import power_transform, quantile_transform
from pathlib import Path
p = Path(__f... | 26.055556 | 85 | 0.666844 |
ac9c868dbd3879029efdc40e10b101e58e412a82 | 7,486 | py | Python | trakt/mapper/sync.py | ruinernin/trakt.py | a579b0adf589e1fb8efe11d1e9b5c4f6fbb78157 | [
"MIT"
] | null | null | null | trakt/mapper/sync.py | ruinernin/trakt.py | a579b0adf589e1fb8efe11d1e9b5c4f6fbb78157 | [
"MIT"
] | null | null | null | trakt/mapper/sync.py | ruinernin/trakt.py | a579b0adf589e1fb8efe11d1e9b5c4f6fbb78157 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
from trakt.mapper.core.base import Mapper
import logging
log = logging.getLogger(__name__)
| 25.462585 | 106 | 0.520438 |
ac9d0e2c93daef472402da87cdc770fca25ab226 | 669 | py | Python | src/murus_gallicus/constants.py | HicBoux/PyMurusGallicus | b1f8ee6f1f1100aa6e04b11db6522b86b14d1c72 | [
"MIT"
] | null | null | null | src/murus_gallicus/constants.py | HicBoux/PyMurusGallicus | b1f8ee6f1f1100aa6e04b11db6522b86b14d1c72 | [
"MIT"
] | null | null | null | src/murus_gallicus/constants.py | HicBoux/PyMurusGallicus | b1f8ee6f1f1100aa6e04b11db6522b86b14d1c72 | [
"MIT"
] | null | null | null | import pygame
pygame.init()
FPS = 60
WIDTH, HEIGHT = 800, 700
ROWS, COLS = 7, 8
SQUARE_SIZE = HEIGHT//ROWS
# GRAPHICAL USER INTERFACE
ICON_PATH = './src/murus_gallicus/assets/noun_checkers_1684698.png'
WINDOW = pygame.display.set_mode((WIDTH, HEIGHT))
PADDING = 20
OUTLINE = 2
# RGB COLORS
RED = (255, 0, 0)
WHITE = ... | 20.272727 | 67 | 0.672646 |
ac9de99ae05f6016bcc3df5250b508a3167f4660 | 5,855 | py | Python | streamer/output_stream.py | meryacine/shaka-streamer | 7b7e90143f531c52d96c162cc7393862db0830b7 | [
"Apache-2.0"
] | 154 | 2019-08-29T16:53:24.000Z | 2022-02-25T00:29:56.000Z | streamer/output_stream.py | meryacine/shaka-streamer | 7b7e90143f531c52d96c162cc7393862db0830b7 | [
"Apache-2.0"
] | 101 | 2019-08-30T17:34:51.000Z | 2022-03-02T18:46:22.000Z | streamer/output_stream.py | meryacine/shaka-streamer | 7b7e90143f531c52d96c162cc7393862db0830b7 | [
"Apache-2.0"
] | 56 | 2019-09-08T17:47:22.000Z | 2022-02-23T17:35:11.000Z | # 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, ... | 35.920245 | 102 | 0.678907 |
ac9eba2ba9ce65d24ae5328dd6dc146fcdf58207 | 939 | py | Python | nghp/misc/utils.py | squoilin/NewGenerationHeatPumps | 6db23af4dbad2098043a74d1871dbcc6f8eee468 | [
"MIT"
] | 1 | 2021-04-12T08:17:59.000Z | 2021-04-12T08:17:59.000Z | nghp/misc/utils.py | squoilin/NewGenerationHeatPumps | 6db23af4dbad2098043a74d1871dbcc6f8eee468 | [
"MIT"
] | null | null | null | nghp/misc/utils.py | squoilin/NewGenerationHeatPumps | 6db23af4dbad2098043a74d1871dbcc6f8eee468 | [
"MIT"
] | 1 | 2020-08-06T16:56:34.000Z | 2020-08-06T16:56:34.000Z | # -*- coding: utf-8 -*-
"""
Useful functions for the Next Generation Heat Pump library
@author: Sylvain Quoilin
"""
import sys,os
| 29.34375 | 65 | 0.642173 |
aca0934a713aae21b84794c1fbd0e3f6f9ca21ea | 829 | py | Python | regex_2.py | python-pro/Learn-Python-by-Doing-by-Jose-Espanol | 5a4a6a6843fec6bbe231900aa0053021c69649d9 | [
"BSD-3-Clause"
] | null | null | null | regex_2.py | python-pro/Learn-Python-by-Doing-by-Jose-Espanol | 5a4a6a6843fec6bbe231900aa0053021c69649d9 | [
"BSD-3-Clause"
] | null | null | null | regex_2.py | python-pro/Learn-Python-by-Doing-by-Jose-Espanol | 5a4a6a6843fec6bbe231900aa0053021c69649d9 | [
"BSD-3-Clause"
] | null | null | null | # B_R_R
# M_S_A_W
"""
Coding Problem on Regular expressions:
In order to work with regular expressions or we can say regex too,
we have to import its module which is called re
Specifically we use search method of regex library
search method returns match object if it finds any
"""
import re
price='Price: $1... | 20.219512 | 103 | 0.746683 |
aca120dbe457333e15ac5e2607f6815fc7e3bb5a | 4,465 | py | Python | deepchem/data/tests/test_shape.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 3,782 | 2016-02-21T03:53:11.000Z | 2022-03-31T16:10:26.000Z | deepchem/data/tests/test_shape.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 2,666 | 2016-02-11T01:54:54.000Z | 2022-03-31T11:14:33.000Z | deepchem/data/tests/test_shape.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 1,597 | 2016-02-21T03:10:08.000Z | 2022-03-30T13:21:28.000Z | import deepchem as dc
import numpy as np
import os
def test_numpy_dataset_get_shape():
"""Test that get_shape works for numpy datasets."""
num_datapoints = 100
num_features = 10
num_tasks = 10
# Generate data
X = np.random.rand(num_datapoints, num_features)
y = np.random.randint(2, size=(num_datapoints,... | 33.074074 | 80 | 0.738186 |
aca1d2adb961819b9cb0c1cf592fcc379fa33038 | 1,104 | py | Python | docs/hydrostatic-pressure/hydrostatic_pressure.py | TOKU-Systems/tutorials | 119329b8efa614d39cda342b6bb084476fbec551 | [
"MIT"
] | null | null | null | docs/hydrostatic-pressure/hydrostatic_pressure.py | TOKU-Systems/tutorials | 119329b8efa614d39cda342b6bb084476fbec551 | [
"MIT"
] | 1 | 2021-09-03T22:11:43.000Z | 2021-09-03T22:11:43.000Z | docs/hydrostatic-pressure/hydrostatic_pressure.py | TOKU-Systems/tutorials | 119329b8efa614d39cda342b6bb084476fbec551 | [
"MIT"
] | null | null | null | import pandas as pd
df = pd.read_sql(
'''
SELECT a.name, h.name, s.name, sd.t, sd.y
FROM assets a
JOIN hardpoints h ON a.id = h.asset_id
JOIN signals s ON h.id = s.hardpoint_id
JOIN LATERAL (
SELECT x.t, x.y
FROM signal_data x
WHERE x.signal_id = s.id
ORDER BY x... | 28.307692 | 87 | 0.620471 |