hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f739ab2e7da05df02e8a0bb23f983d4e84291de6
7,439
py
Python
gennav/envs/binaryOccupancyGrid2D_env.py
pranavgo/gennav
fc57707912c6f1c6af208a30b2ab0ad78c2cc798
[ "MIT" ]
null
null
null
gennav/envs/binaryOccupancyGrid2D_env.py
pranavgo/gennav
fc57707912c6f1c6af208a30b2ab0ad78c2cc798
[ "MIT" ]
null
null
null
gennav/envs/binaryOccupancyGrid2D_env.py
pranavgo/gennav
fc57707912c6f1c6af208a30b2ab0ad78c2cc798
[ "MIT" ]
null
null
null
import numpy as np from gennav.envs.base import Environment from gennav.utils.common import RobotState from gennav.utils.geometry import Point from matplotlib import pyplot as plt class BinaryOccupancyGrid2DEnv(Environment): """Base class for a Binary Occupancy Grid 2D envrionment. Arguments: X (unsi...
37.195
119
0.56634
import numpy as np from gennav.envs.base import Environment from gennav.utils.common import RobotState from gennav.utils.geometry import Point from matplotlib import pyplot as plt class BinaryOccupancyGrid2DEnv(Environment): def __init__(self, X=10, Y=10): super(BinaryOccupancyGrid2DEnv, self).__init__()...
true
true
f739adbe6fbb5a4d0d1b1b218dbbca4bcaeca0af
1,379
py
Python
api/utils/m3u.py
StoneMoe/Anime-API
cef7186a198c8af35bc642a756dd40d88544d07c
[ "MIT" ]
null
null
null
api/utils/m3u.py
StoneMoe/Anime-API
cef7186a198c8af35bc642a756dd40d88544d07c
[ "MIT" ]
null
null
null
api/utils/m3u.py
StoneMoe/Anime-API
cef7186a198c8af35bc642a756dd40d88544d07c
[ "MIT" ]
null
null
null
import re from dataclasses import dataclass from logging import getLogger from typing import List logger = getLogger('M3U') @dataclass class M3UMedia: title: str tvg_name: str tvg_ID: str tvg_logo: str tvg_group: str link: str class M3UParser: """Mod from https://github.com/Timmy93/M3uP...
26.519231
80
0.57578
import re from dataclasses import dataclass from logging import getLogger from typing import List logger = getLogger('M3U') @dataclass class M3UMedia: title: str tvg_name: str tvg_ID: str tvg_logo: str tvg_group: str link: str class M3UParser: def __init__(self, content: str = None): ...
true
true
f739b0de39ba522d0f0921439324218d5be5adb7
8,835
py
Python
magic_button_a.py
ContinuumBridge/magic_button
ecc42e333b28c93a19197300bcfd95a05a9b995f
[ "MIT" ]
null
null
null
magic_button_a.py
ContinuumBridge/magic_button
ecc42e333b28c93a19197300bcfd95a05a9b995f
[ "MIT" ]
null
null
null
magic_button_a.py
ContinuumBridge/magic_button
ecc42e333b28c93a19197300bcfd95a05a9b995f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # magic_button_.py """ Copyright (c) 2015 ContinuumBridge Limited Written by Peter Claydon """ import sys import os.path import time import json from twisted.internet import reactor from cbcommslib import CbApp, CbClient from cbconfig import * configFile = CB_CONFIG_DIR + "magic_button....
44.175
139
0.519977
import sys import os.path import time import json from twisted.internet import reactor from cbcommslib import CbApp, CbClient from cbconfig import * configFile = CB_CONFIG_DIR + "magic_button.config" CHECK_INTERVAL = 30 WATCHDOG_INTERVAL = 70 MAX_SEND_INTERVAL = 60*30 CID = "C...
true
true
f739b1b19515993ce66190bb30755066f04b1c71
5,545
py
Python
lowfat/management/commands/load2019applications.py
elena-kolomeets/lowfat
f7647f5cd12519f722e41808157a96cc3e37b6ce
[ "BSD-3-Clause" ]
6
2017-02-23T16:44:36.000Z
2019-03-18T11:39:03.000Z
lowfat/management/commands/load2019applications.py
elena-kolomeets/lowfat
f7647f5cd12519f722e41808157a96cc3e37b6ce
[ "BSD-3-Clause" ]
286
2017-02-07T15:00:41.000Z
2022-03-08T12:56:09.000Z
lowfat/management/commands/load2019applications.py
elena-kolomeets/lowfat
f7647f5cd12519f722e41808157a96cc3e37b6ce
[ "BSD-3-Clause" ]
2
2018-06-19T12:38:08.000Z
2020-11-23T12:15:08.000Z
import pandas as pd from django.contrib.auth import get_user_model from django.contrib.auth.models import BaseUserManager from django.core.management.base import BaseCommand from django.db import IntegrityError from lowfat.models import Claimant class Command(BaseCommand): help = "Import CSV with 2019 applicatio...
50.409091
332
0.555275
import pandas as pd from django.contrib.auth import get_user_model from django.contrib.auth.models import BaseUserManager from django.core.management.base import BaseCommand from django.db import IntegrityError from lowfat.models import Claimant class Command(BaseCommand): help = "Import CSV with 2019 applicatio...
true
true
f739b1ea57fb45b466c82f6f7931188c2c068e75
2,294
py
Python
test/other/dataTest.old.py
meracan/s3-netcdf-api
920d09ef7b1a205230ea2c76eabcb4853616992c
[ "MIT" ]
1
2020-08-30T01:47:45.000Z
2020-08-30T01:47:45.000Z
test/other/dataTest.old.py
meracan/s3-netcdf-api
920d09ef7b1a205230ea2c76eabcb4853616992c
[ "MIT" ]
null
null
null
test/other/dataTest.old.py
meracan/s3-netcdf-api
920d09ef7b1a205230ea2c76eabcb4853616992c
[ "MIT" ]
null
null
null
import numpy as np from datetime import datetime npe=3 nelem=20 nnode=10 nstation=27 nsnode=3 ntime=8760 nfreq=3 ndir=5 elem=np.arange(nelem*npe,dtype="i4").reshape((nelem,npe)) time=np.datetime64(datetime(2000,1,1))+np.arange((ntime))*np.timedelta64(1, 'h') lat=np.arange((nnode),dtype="f8") lon=np.arange((nnode),dty...
26.367816
123
0.624237
import numpy as np from datetime import datetime npe=3 nelem=20 nnode=10 nstation=27 nsnode=3 ntime=8760 nfreq=3 ndir=5 elem=np.arange(nelem*npe,dtype="i4").reshape((nelem,npe)) time=np.datetime64(datetime(2000,1,1))+np.arange((ntime))*np.timedelta64(1, 'h') lat=np.arange((nnode),dtype="f8") lon=np.arange((nnode),dty...
true
true
f739b2a8f3b93c7ecc928486e5d8e852d554f5b4
2,140
py
Python
tests/test_packer.py
asyaf/speech-packer
5c576ef8922f2ec1279a53cb7ebbc6e5fd51157c
[ "MIT" ]
null
null
null
tests/test_packer.py
asyaf/speech-packer
5c576ef8922f2ec1279a53cb7ebbc6e5fd51157c
[ "MIT" ]
null
null
null
tests/test_packer.py
asyaf/speech-packer
5c576ef8922f2ec1279a53cb7ebbc6e5fd51157c
[ "MIT" ]
null
null
null
import mock import pytest import random from speech_packer import Packer, SpeechAnalyzer ITEMS = ['t-shirt', 'jeans', 'raincoat', 'sneakers', 'hiking boots'] @mock.patch("speech_packer.SpeechAnalyzer") def test__add_item(mock_analyzer): item = random.choice(ITEMS) mock_analyzer.process_single_phrase.return_v...
30.140845
68
0.719626
import mock import pytest import random from speech_packer import Packer, SpeechAnalyzer ITEMS = ['t-shirt', 'jeans', 'raincoat', 'sneakers', 'hiking boots'] @mock.patch("speech_packer.SpeechAnalyzer") def test__add_item(mock_analyzer): item = random.choice(ITEMS) mock_analyzer.process_single_phrase.return_v...
true
true
f739b304d34d719447a7561c7c99fb4cab2d7bb8
32,375
py
Python
seq2act/models/input.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
seq2act/models/input.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
seq2act/models/input.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
42.486877
80
0.652942
from __future__ import absolute_import from __future__ import division from __future__ import print_function from enum import Enum from tensor2tensor.layers import common_layers import tensorflow.compat.v1 as tf NUM_TOKENS_PER_OBJ = 30 NUM_TOKENS_PER_SYN = 30 class DataSource(Enum): RICO_SCA = '...
true
true
f739b352172edd66940a05e6d089bdf9743cb12f
1,110
py
Python
jdcloud_sdk/services/waf/models/KeyValCfg.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
jdcloud_sdk/services/waf/models/KeyValCfg.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
jdcloud_sdk/services/waf/models/KeyValCfg.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.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 by applicable law or agreed ...
30.833333
75
0.673874
class KeyValCfg(object): def __init__(self, key, val, atCfg, id=None, matchOp=None): self.id = id self.matchOp = matchOp self.key = key self.val = val self.atCfg = atCfg
true
true
f739b4d5394ea28e6767e0a78ff090af422b45e3
79
py
Python
refresh.py
abagh0703/RetailTrail
cbca3c052523c52935066c5585e5dd2f1c6b4b1e
[ "MIT" ]
null
null
null
refresh.py
abagh0703/RetailTrail
cbca3c052523c52935066c5585e5dd2f1c6b4b1e
[ "MIT" ]
null
null
null
refresh.py
abagh0703/RetailTrail
cbca3c052523c52935066c5585e5dd2f1c6b4b1e
[ "MIT" ]
null
null
null
#!flask/bin/python from app.views import update_all_sheets update_all_sheets();
26.333333
39
0.835443
from app.views import update_all_sheets update_all_sheets();
true
true
f739b57c6f533d8d403860c1962bebbc5e0b02d3
4,993
py
Python
src/features/build_features.py
cafe-com-analytics/stock_market_index_daily_direction
e05eced04d3f0ae3134315de0163bfdf140c1e4a
[ "MIT" ]
null
null
null
src/features/build_features.py
cafe-com-analytics/stock_market_index_daily_direction
e05eced04d3f0ae3134315de0163bfdf140c1e4a
[ "MIT" ]
8
2021-05-30T21:32:35.000Z
2021-06-14T23:43:42.000Z
src/features/build_features.py
cafe-com-analytics/stock_market_index_daily_direction
e05eced04d3f0ae3134315de0163bfdf140c1e4a
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import yfinance as yf def downloading_stocks_data(dct, start_date: str = "2021-01-01", end_date: str = "2021-07-01") -> pd.DataFrame: """ Download the stocks daily information from tickers listed as keys of a dictionary, gets only "Close" price from each day within s...
31.402516
115
0.612658
import numpy as np import pandas as pd import yfinance as yf def downloading_stocks_data(dct, start_date: str = "2021-01-01", end_date: str = "2021-07-01") -> pd.DataFrame: df = yf.download(list(dct.keys())[0], start=start_date, end=end_date, show_errors=False)[["Close"]] df.columns = [dct[list(dct.keys())[0]...
true
true
f739b8a64cad0334355a6d8a82943c315faa60c0
9,878
py
Python
tests/components/greeneye_monitor/test_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/greeneye_monitor/test_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/greeneye_monitor/test_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for greeneye_monitor sensors.""" from unittest.mock import AsyncMock from homeassistant.components.greeneye_monitor.sensor import ( DATA_PULSES, DATA_WATT_SECONDS, ) from homeassistant.const import STATE_UNKNOWN from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_registry im...
46.815166
183
0.766147
from unittest.mock import AsyncMock from homeassistant.components.greeneye_monitor.sensor import ( DATA_PULSES, DATA_WATT_SECONDS, ) from homeassistant.const import STATE_UNKNOWN from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_registry import ( RegistryEntryDisabler, asyn...
true
true
f739b8cbc7ce76e5b962e754b6abd04e7238cdb2
4,021
py
Python
bayesian_irl/src/utils/prob_dists.py
clear-nus/BOIRL
cc872111fda3c7b8118e1a864831013c30f63948
[ "MIT" ]
1
2021-02-26T10:09:15.000Z
2021-02-26T10:09:15.000Z
bayesian_irl/src/utils/prob_dists.py
clear-nus/BOIRL
cc872111fda3c7b8118e1a864831013c30f63948
[ "MIT" ]
null
null
null
bayesian_irl/src/utils/prob_dists.py
clear-nus/BOIRL
cc872111fda3c7b8118e1a864831013c30f63948
[ "MIT" ]
null
null
null
import scipy.stats import numpy as np from scipy.stats import multivariate_normal as MVG class UniformDist: def __init__(self, xmax=1., xmin=None): self.xmax = xmax self.xmin = - xmax if xmin is None else xmin self.prob = 1 / (self.xmax - self.xmin) def __call__(self, *args, **kwargs):...
30.930769
109
0.570754
import scipy.stats import numpy as np from scipy.stats import multivariate_normal as MVG class UniformDist: def __init__(self, xmax=1., xmin=None): self.xmax = xmax self.xmin = - xmax if xmin is None else xmin self.prob = 1 / (self.xmax - self.xmin) def __call__(self, *args, **kwargs):...
true
true
f739b9330172f97b95754ddd39d54eca41d67a5d
829
gyp
Python
ui/gfx/compositor/compositor.gyp
meego-tablet-ux/meego-app-browser
0f4ef17bd4b399c9c990a2f6ca939099495c2b9c
[ "BSD-3-Clause" ]
1
2015-10-12T09:14:22.000Z
2015-10-12T09:14:22.000Z
ui/gfx/compositor/compositor.gyp
meego-tablet-ux/meego-app-browser
0f4ef17bd4b399c9c990a2f6ca939099495c2b9c
[ "BSD-3-Clause" ]
null
null
null
ui/gfx/compositor/compositor.gyp
meego-tablet-ux/meego-app-browser
0f4ef17bd4b399c9c990a2f6ca939099495c2b9c
[ "BSD-3-Clause" ]
1
2020-11-04T07:22:28.000Z
2020-11-04T07:22:28.000Z
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'compositor', 'type': '<(library)', 'msvs_guid': '21CEE0E3-6F4E-4F01-B8C9-F7751CC21AA9', 'd...
24.382353
72
0.482509
{ 'targets': [ { 'target_name': 'compositor', 'type': '<(library)', 'msvs_guid': '21CEE0E3-6F4E-4F01-B8C9-F7751CC21AA9', 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/ui/gfx/gl/gl.gyp:gl', '<(DEPTH)/ui/ui.gyp:ui_gfx', ], 'sources': [ ...
true
true
f739b9472eb8f51df7defc5cbc20455e81259810
2,075
py
Python
libs/XSSImageCheck.py
Fa1c0n35/RootTheBoxs
4f2a9886c8eedca3039604b93929c8c09866115e
[ "Apache-2.0" ]
1
2019-06-29T08:40:54.000Z
2019-06-29T08:40:54.000Z
libs/XSSImageCheck.py
Fa1c0n35/RootTheBoxs
4f2a9886c8eedca3039604b93929c8c09866115e
[ "Apache-2.0" ]
null
null
null
libs/XSSImageCheck.py
Fa1c0n35/RootTheBoxs
4f2a9886c8eedca3039604b93929c8c09866115e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: moloch Copyright 2014 -------------------------------------------- Check for ticksy .gif and .bmp files http://jklmnn.de/imagejs/ """ import os from string import printable from tornado.options import options from random import randint MAX_AVATAR_SIZE = 1024 * 1024 MIN_AVA...
22.802198
65
0.589398
import os from string import printable from tornado.options import options from random import randint MAX_AVATAR_SIZE = 1024 * 1024 MIN_AVATAR_SIZE = 64 IMG_FORMATS = ["png", "jpeg", "jpg", "gif", "bmp"] def is_xss_image(data): return all([char in printable for char in data[:16]]) def get_new_avatar(dir, for...
true
true
f739b9c26677c883ffe9a5df52de5da65fa944f6
3,105
py
Python
src/data_prep_helpers.py
edesz/electricity-consumption-forecast
9bc49523d9c2ed6d827ce690916980cf7e818fed
[ "MIT" ]
null
null
null
src/data_prep_helpers.py
edesz/electricity-consumption-forecast
9bc49523d9c2ed6d827ce690916980cf7e818fed
[ "MIT" ]
5
2021-08-23T19:18:49.000Z
2022-02-12T14:10:57.000Z
src/data_prep_helpers.py
edesz/electricity-consumption-forecast
9bc49523d9c2ed6d827ce690916980cf7e818fed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import pandas as pd def add_corona_dates(df, index_name, strategy=["during_corona", "no_corona"]): """ Inputs ------ strategy : List division of datetimes based on stages of corona; acceptable strategies are one of the following (order i...
32.010309
78
0.515942
import pandas as pd def add_corona_dates(df, index_name, strategy=["during_corona", "no_corona"]): d_corona = { "BE": [ pd.to_datetime("2020-03-07 00:00:00"), pd.to_datetime("2020-04-12 23:00:00"), ], "CH": [ pd.to_datetime("2020-03-07 00:00:00"), ...
true
true
f739b9d2e83bc8735cf1080a47202ed8db294e20
563
py
Python
Mundo_1/Ex004.py
alinenog/Mundo_Python-1-2-3
2cfda105eec436ae32394e01c011342515fceff5
[ "MIT" ]
null
null
null
Mundo_1/Ex004.py
alinenog/Mundo_Python-1-2-3
2cfda105eec436ae32394e01c011342515fceff5
[ "MIT" ]
null
null
null
Mundo_1/Ex004.py
alinenog/Mundo_Python-1-2-3
2cfda105eec436ae32394e01c011342515fceff5
[ "MIT" ]
null
null
null
# Exercício Python 4: #Faça um programa que leia algo pelo teclado e mostre na tela o seu tipo primitivo e todas as informações #possíveis sobre ele..''' e=input('Digite algo:') print('Entrada é um número: ',e.isnumeric()) print('Entrada é decimal:',e.isdecimal()) print('Entrada é alfabetica:',e.isalpha()) pr...
40.214286
133
0.687389
print('Entrada é um número: ',e.isnumeric()) print('Entrada é decimal:',e.isdecimal()) print('Entrada é alfabetica:',e.isalpha()) print('Esta em maisculas ?', e.isupper()) print('Esta em minusculas ?',e.islower()) print('Esta capitalizada',(e.istitle())) print('É alfabético ?',e.isalpha()) print('E alfanumeri...
true
true
f739bb01fb98ab63d34326e29de7f3b579ae56e8
420
py
Python
backend/covid-backend/config.py
alesanmed-educational-projects/core-data-covid-project
ab43beb98dba4153320796b54a078bb6075b0fd5
[ "Unlicense" ]
null
null
null
backend/covid-backend/config.py
alesanmed-educational-projects/core-data-covid-project
ab43beb98dba4153320796b54a078bb6075b0fd5
[ "Unlicense" ]
18
2021-07-24T20:17:40.000Z
2021-08-19T09:55:01.000Z
backend/covid-backend/config.py
alesanmed-educational-projects/core-data-covid-project
ab43beb98dba4153320796b54a078bb6075b0fd5
[ "Unlicense" ]
null
null
null
import os class Config(object): DEBUG = True DEVELOPMENT = True PG_USER = os.environ.get("PG_USER", "") PG_PASS = os.environ.get("PG_PASS", "") PG_HOST = os.environ.get("PG_HOST", "") PG_PORT = os.environ.get("PG_PORT", "") PG_DB = os.environ.get("PG_DB", "") SENDGRID_KEY = os.environ....
23.333333
53
0.628571
import os class Config(object): DEBUG = True DEVELOPMENT = True PG_USER = os.environ.get("PG_USER", "") PG_PASS = os.environ.get("PG_PASS", "") PG_HOST = os.environ.get("PG_HOST", "") PG_PORT = os.environ.get("PG_PORT", "") PG_DB = os.environ.get("PG_DB", "") SENDGRID_KEY = os.environ....
true
true
f739bbf109547b406feb03f593af55b0d99a80a5
11,180
py
Python
src/openne/Z_0709.py
barcawy/OpenNE
88018ed9bf34d09020464a430e09afb704b1f322
[ "MIT" ]
null
null
null
src/openne/Z_0709.py
barcawy/OpenNE
88018ed9bf34d09020464a430e09afb704b1f322
[ "MIT" ]
null
null
null
src/openne/Z_0709.py
barcawy/OpenNE
88018ed9bf34d09020464a430e09afb704b1f322
[ "MIT" ]
null
null
null
from __future__ import print_function import time import math import random import numpy as np import pickle as pkl import networkx as nx from gensim.models import Word2Vec from fastdtw import fastdtw from collections import Counter from collections import defaultdict import os class Z(object): def __init__(self,...
36.298701
124
0.530948
from __future__ import print_function import time import math import random import numpy as np import pickle as pkl import networkx as nx from gensim.models import Word2Vec from fastdtw import fastdtw from collections import Counter from collections import defaultdict import os class Z(object): def __init__(self,...
true
true
f739bc02705cb1b50f7d45185a730e81f1ecfdc1
3,122
py
Python
crafters/image/ImageNormalizer/__init__.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
1
2021-03-19T15:37:02.000Z
2021-03-19T15:37:02.000Z
crafters/image/ImageNormalizer/__init__.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
5,414
2021-04-06T09:04:26.000Z
2022-03-30T13:12:40.000Z
crafters/image/ImageNormalizer/__init__.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" from typing import Tuple, Dict, Union, Iterable import numpy as np from jina.executors.decorators import single from jina.executors.crafters import BaseCrafter from .helper import _load_image, _move_channel_axis, _...
39.518987
107
0.63517
__copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" from typing import Tuple, Dict, Union, Iterable import numpy as np from jina.executors.decorators import single from jina.executors.crafters import BaseCrafter from .helper import _load_image, _move_channel_axis, _...
true
true
f739bca44667cc162cc953a6ea1d4d1f45486694
7,581
py
Python
mmdet/ops/point_sample.py
qiguming/mmdetection
741b638a1fc60408f46d673457a3e1e513d18cf1
[ "Apache-2.0" ]
295
2020-07-16T13:03:29.000Z
2022-03-29T05:20:12.000Z
mmdet/ops/point_sample.py
wondervictor/lvis-mmdet
68532eb6f4643ddf0179a4384c8c9e004a2c1d07
[ "Apache-2.0" ]
136
2021-07-11T11:26:54.000Z
2022-03-31T02:45:34.000Z
mmdet/ops/point_sample.py
wondervictor/lvis-mmdet
68532eb6f4643ddf0179a4384c8c9e004a2c1d07
[ "Apache-2.0" ]
84
2021-05-29T06:58:14.000Z
2022-03-31T07:44:10.000Z
# Modified from https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend # noqa import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair def normalize(grid): """Normalize input grid from [-1, 1] to [0, 1] Args: grid (Tensor): T...
34.616438
101
0.599921
rt torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair def normalize(grid): return (grid + 1.0) / 2.0 def denormalize(grid): return grid * 2.0 - 1.0 def generate_grid(num_grid, size, device): affine_trans = torch.tensor([[[1., 0., 0.], [0., 1., 0.]]]...
true
true
f739bcd914e9dfcfeea5216d022fb72a6c908765
1,526
py
Python
prediction/bimod/qglc/cactus_ccs_comp.py
dylanhross/dmccs
8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3
[ "MIT" ]
3
2021-05-17T20:19:41.000Z
2022-02-01T21:43:30.000Z
prediction/bimod/qglc/cactus_ccs_comp.py
dylanhross/dmccs
8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3
[ "MIT" ]
null
null
null
prediction/bimod/qglc/cactus_ccs_comp.py
dylanhross/dmccs
8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3
[ "MIT" ]
null
null
null
#!/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 """ """ from matplotlib import pyplot as plt import numpy as np # set up plot fonts from matplotlib import rcParams rcParams['font.family'] = 'sans-serif' rcParams['font.sans-serif'] = ['Helvetica', 'Arial'] rcParams['font.size'] = 11 # common settin...
22.115942
116
0.616645
from matplotlib import pyplot as plt import numpy as np from matplotlib import rcParams rcParams['font.family'] = 'sans-serif' rcParams['font.sans-serif'] = ['Helvetica', 'Arial'] rcParams['font.size'] = 11 f_size = (3.5, 4) bs = { 'linewidth': 1., 'align': 'center', 'width': 0.75, 'capstyle': 'round', 'ca...
true
true
f739be22973bf9b06e33d5e55a97e26be3aff193
2,574
py
Python
src/primaires/joueur/commandes/decrire/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
14
2015-08-21T19:15:21.000Z
2017-11-26T13:59:17.000Z
src/primaires/joueur/commandes/decrire/__init__.py
vincent-lg/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
20
2015-09-29T20:50:45.000Z
2018-06-21T12:58:30.000Z
src/primaires/joueur/commandes/decrire/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
3
2015-05-02T19:42:03.000Z
2018-09-06T10:55:00.000Z
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 CORTIER Benoît # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
44.37931
79
0.731546
from primaires.interpreteur.commande.commande import Commande class CmdDecrire(Commande): def __init__(self): Commande.__init__(self, "décrire", "describe") self.groupe = "joueur" self.aide_courte = "Ouvre un éditeur pour se décrire." self.aide_longu...
true
true
f739bea2b48f57cf60765df43c24f03f3ffad921
8,874
py
Python
venv/Lib/site-packages/ipyparallel/apps/baseapp.py
BoxicaLion/BasicMathFormulas
4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2
[ "MIT" ]
null
null
null
venv/Lib/site-packages/ipyparallel/apps/baseapp.py
BoxicaLion/BasicMathFormulas
4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2
[ "MIT" ]
null
null
null
venv/Lib/site-packages/ipyparallel/apps/baseapp.py
BoxicaLion/BasicMathFormulas
4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2
[ "MIT" ]
null
null
null
# encoding: utf-8 """ The Base Application class for ipyparallel apps """ import os import logging import re import sys from traitlets.config.application import catch_config_error, LevelFormatter from IPython.core import release from IPython.core.crashhandler import CrashHandler from IPython.core.application import ...
35.354582
91
0.587785
import os import logging import re import sys from traitlets.config.application import catch_config_error, LevelFormatter from IPython.core import release from IPython.core.crashhandler import CrashHandler from IPython.core.application import ( BaseIPythonApplication, base_aliases as base_ip_aliases, ba...
true
true
f739bf00b78bb8dc33d9a36abc365ddc1b05ac35
1,663
py
Python
projects/research/models/src/app_utils/__init__.py
zaqwes8811/smart-vocabulary-cards
abeab5c86b1c6f68d8796475cba80c4f2c6055ff
[ "Apache-2.0" ]
null
null
null
projects/research/models/src/app_utils/__init__.py
zaqwes8811/smart-vocabulary-cards
abeab5c86b1c6f68d8796475cba80c4f2c6055ff
[ "Apache-2.0" ]
11
2015-01-25T14:22:52.000Z
2015-09-08T09:59:38.000Z
projects/research/models/src/app_utils/__init__.py
zaqwes8811/vocabulary-cards
abeab5c86b1c6f68d8796475cba80c4f2c6055ff
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Std import re # Other import dals import dals.local_host.local_host_io_wrapper as dal def printer(msg): print msg def write_result_file(result_list, fname): sets = dal.get_utf8_template() sets['howOpen'] = 'w' sets['name'] = fname dal.list2file(sets, result_li...
25.584615
76
0.638004
import re import dals import dals.local_host.local_host_io_wrapper as dal def printer(msg): print msg def write_result_file(result_list, fname): sets = dal.get_utf8_template() sets['howOpen'] = 'w' sets['name'] = fname dal.list2file(sets, result_list) def read_utf_txt_fi...
false
true
f739bf1ddfe0951926c6f007d89fed6ea491e3cf
11,960
py
Python
main.py
phwissmann/TV7_EPG_Parser
20e152feb49dcfe68c194ad858f3f33c2b07ea45
[ "MIT" ]
null
null
null
main.py
phwissmann/TV7_EPG_Parser
20e152feb49dcfe68c194ad858f3f33c2b07ea45
[ "MIT" ]
null
null
null
main.py
phwissmann/TV7_EPG_Parser
20e152feb49dcfe68c194ad858f3f33c2b07ea45
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import requests import re import datetime import html import json from epg_sources.tele import tele from epg_sources.teleboy import teleboy from icon_sources.tele import tele as teleicon from icon_sources.teleboy import teleboy as teleboyicon class channel_item: id: str lang: str displa...
37.492163
144
0.596237
import requests import re import datetime import html import json from epg_sources.tele import tele from epg_sources.teleboy import teleboy from icon_sources.tele import tele as teleicon from icon_sources.teleboy import teleboy as teleboyicon class channel_item: id: str lang: str display_name: str clas...
true
true
f739bf459e1c6334962155b8a47c9de38d1871d0
711
py
Python
bot/about.py
alesanmed/YourEnglishTeacher_Bot
eafee609484bb78336bc5279d2e7990099b682c7
[ "Unlicense" ]
1
2021-06-21T15:42:54.000Z
2021-06-21T15:42:54.000Z
bot/about.py
alesanmed-bots/YourEnglishTeacher_Bot
eafee609484bb78336bc5279d2e7990099b682c7
[ "Unlicense" ]
3
2018-12-09T09:46:41.000Z
2018-12-12T17:54:45.000Z
bot/about.py
alesanmed-bots/YourEnglishTeacher_Bot
eafee609484bb78336bc5279d2e7990099b682c7
[ "Unlicense" ]
null
null
null
# encoding: utf-8 from sys import path from os.path import dirname as dir path.append(dir(path[0])) from connectors import users from telegram.ext import CommandHandler def main(dispatcher): about_handler = CommandHandler('about', __about) dispatcher.add_handler(about_handler) def __about(bot, update): ...
32.318182
95
0.691983
from sys import path from os.path import dirname as dir path.append(dir(path[0])) from connectors import users from telegram.ext import CommandHandler def main(dispatcher): about_handler = CommandHandler('about', __about) dispatcher.add_handler(about_handler) def __about(bot, update): update.messag...
true
true
f739c0031b2456d39e32191b69fe6f9348b018ec
7,912
py
Python
nipype/interfaces/ants/utils.py
nicholsn/nipype
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/ants/utils.py
nicholsn/nipype
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/ants/utils.py
nicholsn/nipype
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
[ "BSD-3-Clause" ]
null
null
null
"""ANTS Apply Transforms interface Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data')) >>> os.chdir(datadir) """ import os from .base import ANTS...
40.574359
168
0.652679
import os from .base import ANTSCommand, ANTSCommandInputSpec from ..base import (TraitedSpec, File, traits, isdefined) from ...utils.filemanip import split_filename from nipype.interfaces.base import InputMultiPath class AverageAffineTransformInputSpec(ANTSCommandInputSpec): dimension = trai...
true
true
f739c0308264d87a30ec0d49222d07a6b2fa4c7e
18,039
py
Python
qa/rpc-tests/test_framework/comptool.py
AnonymousDo/Helpico
7b912a593b4863f113e4b1c1d1922df77831253f
[ "MIT" ]
2
2019-12-30T23:16:45.000Z
2021-01-10T21:27:27.000Z
qa/rpc-tests/test_framework/comptool.py
AnonymousDo/Helpico
7b912a593b4863f113e4b1c1d1922df77831253f
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/comptool.py
AnonymousDo/Helpico
7b912a593b4863f113e4b1c1d1922df77831253f
[ "MIT" ]
2
2020-03-09T01:20:31.000Z
2021-01-24T19:47:14.000Z
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from .mininode import * from .blockstore import BlockStore, TxStore from .util import p2p_port ''' This is a tool for comparing two or more helpicods ...
44.761787
145
0.603193
from .mininode import * from .blockstore import BlockStore, TxStore from .util import p2p_port ''' This is a tool for comparing two or more helpicods to each other using a script provided. To use, create a class that implements get_tests(), and pass it in as the test generator to TestManager. get_tests() shoul...
false
true
f739c131ee53f3aa4246f208bf0957e5d21c1c45
19,982
py
Python
scarlet/display.py
Xudewang/scarlet
1d2a1806038cda8ac96e4c766a5cfa0b8ae5c1b7
[ "MIT" ]
1
2021-06-02T07:05:42.000Z
2021-06-02T07:05:42.000Z
scarlet/display.py
Xudewang/scarlet
1d2a1806038cda8ac96e4c766a5cfa0b8ae5c1b7
[ "MIT" ]
null
null
null
scarlet/display.py
Xudewang/scarlet
1d2a1806038cda8ac96e4c766a5cfa0b8ae5c1b7
[ "MIT" ]
null
null
null
import numpy as np from astropy.visualization.lupton_rgb import LinearMapping, AsinhMapping import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Polygon from matplotlib.ticker import MaxNLocator from .bbox import Box from .component import Component def channels_to_rgb(channels): """Get the l...
34.274443
88
0.591232
import numpy as np from astropy.visualization.lupton_rgb import LinearMapping, AsinhMapping import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Polygon from matplotlib.ticker import MaxNLocator from .bbox import Box from .component import Component def channels_to_rgb(channels): assert chann...
true
true
f739c1ff940a1c8a4d27ed70b89d0437b211ebb7
23,006
py
Python
assets/src/ba_data/python/bastd/ui/watch.py
MalTarDesigns/ballistica
c38ae5c39b3cc7985be166a959245ca060d3bf31
[ "MIT" ]
2
2020-07-02T22:18:58.000Z
2020-07-02T22:19:49.000Z
assets/src/ba_data/python/bastd/ui/watch.py
MalTarDesigns/ballistica
c38ae5c39b3cc7985be166a959245ca060d3bf31
[ "MIT" ]
null
null
null
assets/src/ba_data/python/bastd/ui/watch.py
MalTarDesigns/ballistica
c38ae5c39b3cc7985be166a959245ca060d3bf31
[ "MIT" ]
null
null
null
# Copyright (c) 2011-2020 Eric Froemling # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish,...
43.737643
79
0.541815
from __future__ import annotations import os from typing import TYPE_CHECKING, cast import _ba import ba if TYPE_CHECKING: from typing import Any, Optional, Tuple, Dict class WatchWindow(ba.Window): def __init__(self, transition: Optional[str] = 'in_right', ...
true
true
f739c29117398c7733bfa2df2adfe0157bd1a664
3,354
py
Python
templation/models.py
qdqmedia/django-templation
30f2e71f317bf635ace8cce119aface3fe89e876
[ "BSD-3-Clause" ]
7
2015-12-14T23:22:12.000Z
2021-04-15T20:24:23.000Z
templation/models.py
qdqmedia/django-templation
30f2e71f317bf635ace8cce119aface3fe89e876
[ "BSD-3-Clause" ]
null
null
null
templation/models.py
qdqmedia/django-templation
30f2e71f317bf635ace8cce119aface3fe89e876
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import shutil import hmac import hashlib from django.db import models from django.db.models.signals import post_save from django.conf import settings from django.utils.translation import ugettext_lazy as _ from .settings import DAV_ROOT, PROVIDER_...
34.22449
77
0.684258
from __future__ import absolute_import import os import shutil import hmac import hashlib from django.db import models from django.db.models.signals import post_save from django.conf import settings from django.utils.translation import ugettext_lazy as _ from .settings import DAV_ROOT, PROVIDER_NAME, BOILERPLATE_INITI...
true
true
f739c30aa08b79466c9ab4a61de9c8cd42f10b2e
24,586
py
Python
engineio/asyncio_client.py
dominikWin/python-engineio
3c221aaec7173a046ca42f6aff9be0915cf92237
[ "MIT" ]
null
null
null
engineio/asyncio_client.py
dominikWin/python-engineio
3c221aaec7173a046ca42f6aff9be0915cf92237
[ "MIT" ]
null
null
null
engineio/asyncio_client.py
dominikWin/python-engineio
3c221aaec7173a046ca42f6aff9be0915cf92237
[ "MIT" ]
null
null
null
import asyncio import ssl try: import aiohttp except ImportError: # pragma: no cover aiohttp = None import six try: import websockets except ImportError: # pragma: no cover websockets = None from . import client from . import exceptions from . import packet from . import payload class AsyncClient(...
41.884157
79
0.550069
import asyncio import ssl try: import aiohttp except ImportError: aiohttp = None import six try: import websockets except ImportError: websockets = None from . import client from . import exceptions from . import packet from . import payload class AsyncClient(client.Client): def is_asyncio_b...
true
true
f739c35c1e0492971857838c78089425e5b5139e
300
py
Python
source/astroNS/links/predicates/regex.py
pyastroNS/astroNS
35687267179467e4cb7ea59ac119c5f0f182107f
[ "MIT" ]
null
null
null
source/astroNS/links/predicates/regex.py
pyastroNS/astroNS
35687267179467e4cb7ea59ac119c5f0f182107f
[ "MIT" ]
null
null
null
source/astroNS/links/predicates/regex.py
pyastroNS/astroNS
35687267179467e4cb7ea59ac119c5f0f182107f
[ "MIT" ]
null
null
null
""" Regular expression match """ import re pattern = re.compile("(.*) regex '(.*)'") def fn(groups, lsv_fn): """Regular expression search function""" field, pattern = groups route_regex = re.compile(pattern) return lambda data: route_regex.search(str(lsv_fn(data, field))) != None
25
76
0.663333
import re pattern = re.compile("(.*) regex '(.*)'") def fn(groups, lsv_fn): field, pattern = groups route_regex = re.compile(pattern) return lambda data: route_regex.search(str(lsv_fn(data, field))) != None
true
true
f739c503de6c40e89ddda501b851f1192c57c3a3
27,781
py
Python
molpal/objectives/pyscreener/docking/base.py
ashuein/molpal
1e17a0c406516ceaeaf273a6983d06206bcfe76f
[ "MIT" ]
1
2021-01-12T11:51:26.000Z
2021-01-12T11:51:26.000Z
molpal/objectives/pyscreener/docking/base.py
ashuein/molpal
1e17a0c406516ceaeaf273a6983d06206bcfe76f
[ "MIT" ]
null
null
null
molpal/objectives/pyscreener/docking/base.py
ashuein/molpal
1e17a0c406516ceaeaf273a6983d06206bcfe76f
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from concurrent.futures import Executor import csv from functools import partial from itertools import chain from math import ceil, exp, log10 import os from pathlib import Path import timeit from typing import Dict, Iterable, List, Optional, Sequence, Tuple, Type from rdkit import ...
38.854545
127
0.580685
from abc import ABC, abstractmethod from concurrent.futures import Executor import csv from functools import partial from itertools import chain from math import ceil, exp, log10 import os from pathlib import Path import timeit from typing import Dict, Iterable, List, Optional, Sequence, Tuple, Type from rdkit import ...
true
true
f739c519bdff3ea0513a876d0a9b7c47e6b5da68
3,963
py
Python
ClassifierCode/classifier_builder.py
annaw3558/BankNoteClassifier
18605b44f949a84bf78b43dec741ca003d17209c
[ "MIT" ]
null
null
null
ClassifierCode/classifier_builder.py
annaw3558/BankNoteClassifier
18605b44f949a84bf78b43dec741ca003d17209c
[ "MIT" ]
null
null
null
ClassifierCode/classifier_builder.py
annaw3558/BankNoteClassifier
18605b44f949a84bf78b43dec741ca003d17209c
[ "MIT" ]
null
null
null
'''This program contains the functions averageFinder and midpointFinder. AverageData calculates the averages of the "columns" of a list of numbers (a list of lists of numbers) for real and fake samples (separately) and midpointFinder finds the midpoint between the real and fake averages. Data is either given from the t...
43.076087
123
0.685592
def averageFinder(sample_data): real_avgs_counter = 0 counter_avgs_counter = 0 real_avgs = [] counter_avgs = [] avg_len_real = 0 indx = 0 while indx < 4: for i in range(0,len(sample_data)): if sample_data[i][4] == 1: real_avgs_counter += sample_data[i...
true
true
f739c60c96f276337c40ba0361f5ed79dc59c86c
327
py
Python
src/grpc_interceptor/__init__.py
dan-hipschman-od/grpc-interceptor
b01d7ab47af999d519e5899488f0930a232c30ba
[ "MIT" ]
null
null
null
src/grpc_interceptor/__init__.py
dan-hipschman-od/grpc-interceptor
b01d7ab47af999d519e5899488f0930a232c30ba
[ "MIT" ]
null
null
null
src/grpc_interceptor/__init__.py
dan-hipschman-od/grpc-interceptor
b01d7ab47af999d519e5899488f0930a232c30ba
[ "MIT" ]
null
null
null
"""Simplified Python gRPC interceptors.""" from grpc_interceptor.exception_to_status import ExceptionToStatusInterceptor from grpc_interceptor.server import MethodName, parse_method_name, ServerInterceptor __all__ = [ "ExceptionToStatusInterceptor", "MethodName", "parse_method_name", "ServerIntercept...
25.153846
84
0.795107
from grpc_interceptor.exception_to_status import ExceptionToStatusInterceptor from grpc_interceptor.server import MethodName, parse_method_name, ServerInterceptor __all__ = [ "ExceptionToStatusInterceptor", "MethodName", "parse_method_name", "ServerInterceptor", ]
true
true
f739c6607eddcef200a3763c3b00bdb60213b3d6
1,867
py
Python
watdo.py
KeyboardFire/watdo-today
81df04ae526832d5ebea9d657140edf4001938dd
[ "MIT" ]
2
2015-02-02T09:53:40.000Z
2015-02-05T23:52:41.000Z
watdo.py
KeyboardFire/watdo-today
81df04ae526832d5ebea9d657140edf4001938dd
[ "MIT" ]
null
null
null
watdo.py
KeyboardFire/watdo-today
81df04ae526832d5ebea9d657140edf4001938dd
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from html.parser import HTMLParser import urllib.request import webbrowser import datetime LANG = 'en' TMPFILE = '/tmp/watdo.html' class Parser(HTMLParser): def __init__(self): super(Parser, self).__init__() self.handle_next_h2 = False self.handle_until_h2 = False ...
30.112903
97
0.53669
from html.parser import HTMLParser import urllib.request import webbrowser import datetime LANG = 'en' TMPFILE = '/tmp/watdo.html' class Parser(HTMLParser): def __init__(self): super(Parser, self).__init__() self.handle_next_h2 = False self.handle_until_h2 = False self.result = '...
true
true
f739c66d3f0e41d16f5064b1dfd3208c2ce3d1c5
378
py
Python
ModuloTest.py
cohadar/java-snippets
d55baabed6fca9faa2b60cf0b58fa64b651b450d
[ "MIT" ]
null
null
null
ModuloTest.py
cohadar/java-snippets
d55baabed6fca9faa2b60cf0b58fa64b651b450d
[ "MIT" ]
null
null
null
ModuloTest.py
cohadar/java-snippets
d55baabed6fca9faa2b60cf0b58fa64b651b450d
[ "MIT" ]
null
null
null
from __future__ import division import random import unittest class ModuloTest(unittest.TestCase): def test_negmod(self): for _ in xrange(10000): a = random.randint(-10000, 10000) b = random.randint(-10000, 10000) if b == 0: b = random.randint(1, 10000) q = a // b r = a % b self.assertEqual(a...
19.894737
36
0.653439
from __future__ import division import random import unittest class ModuloTest(unittest.TestCase): def test_negmod(self): for _ in xrange(10000): a = random.randint(-10000, 10000) b = random.randint(-10000, 10000) if b == 0: b = random.randint(1, 10000) q = a // b r = a % b self.assertEqual(a...
true
true
f739c6b0f9b7f0cc1b3831a9bac8a6add061d250
25,211
py
Python
metasync/dropbox/dropbox.py
dstarikov/metavault
1933cc6cd828ee9c594a45a78238a9a319de0143
[ "MIT" ]
1
2019-05-28T15:59:35.000Z
2019-05-28T15:59:35.000Z
metasync/dropbox/dropbox.py
dstarikov/metavault
1933cc6cd828ee9c594a45a78238a9a319de0143
[ "MIT" ]
null
null
null
metasync/dropbox/dropbox.py
dstarikov/metavault
1933cc6cd828ee9c594a45a78238a9a319de0143
[ "MIT" ]
null
null
null
__all__ = [ 'Dropbox', 'DropboxTeam', 'create_session', ] # This should always be 0.0.0 in master. Only update this after tagging # before release. __version__ = '0.0.0' import contextlib import json import logging import random import time import requests import six from . import files, stone_serialize...
41.329508
94
0.589822
__all__ = [ 'Dropbox', 'DropboxTeam', 'create_session', ] __version__ = '0.0.0' import contextlib import json import logging import random import time import requests import six from . import files, stone_serializers from .auth import ( AuthError_validator, RateLimitError_validator, ) from .co...
true
true
f739c889b4f980cb45ac1e10f79885ee3a23b3b7
224
py
Python
test/TestFizzBuzz.py
ystromm/rx-lab-py
b3af3f4a56a41d0284c61813ad7d9951f3538dd1
[ "Apache-2.0" ]
null
null
null
test/TestFizzBuzz.py
ystromm/rx-lab-py
b3af3f4a56a41d0284c61813ad7d9951f3538dd1
[ "Apache-2.0" ]
1
2021-02-09T08:11:09.000Z
2021-02-09T08:11:09.000Z
test/TestFizzBuzz.py
ystromm/rx-lab-py
b3af3f4a56a41d0284c61813ad7d9951f3538dd1
[ "Apache-2.0" ]
null
null
null
import unittest from src.fizzbuzz import FizzBuzz class MyTestCase(unittest.TestCase): def test_something(self): self.assertEqual(FizzBuzz().fixxBuzz(), "1 2") if __name__ == '__main__': unittest.main()
17.230769
54
0.705357
import unittest from src.fizzbuzz import FizzBuzz class MyTestCase(unittest.TestCase): def test_something(self): self.assertEqual(FizzBuzz().fixxBuzz(), "1 2") if __name__ == '__main__': unittest.main()
true
true
f739c9c9ba6cf4dc0888a2f41048bb55910c7c84
2,416
py
Python
NLP_Offensive_Language_Detection/data_process_w2v.py
quantumiracle/Course_Code
5dffd874b33af983fc309e064cc3eaeebbebbae4
[ "MIT" ]
null
null
null
NLP_Offensive_Language_Detection/data_process_w2v.py
quantumiracle/Course_Code
5dffd874b33af983fc309e064cc3eaeebbebbae4
[ "MIT" ]
null
null
null
NLP_Offensive_Language_Detection/data_process_w2v.py
quantumiracle/Course_Code
5dffd874b33af983fc309e064cc3eaeebbebbae4
[ "MIT" ]
1
2021-06-12T16:06:10.000Z
2021-06-12T16:06:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/2/15 17:36 # @Author : Kang # @Site : # @File : data_process.py # @Software: PyCharm import pandas as pd from gensim.models import Word2Vec from sklearn.decomposition import IncrementalPCA # inital reduction from sklearn.manifold import TSNE ...
30.974359
102
0.636175
import pandas as pd from gensim.models import Word2Vec from sklearn.decomposition import IncrementalPCA from sklearn.manifold import TSNE import numpy as np from data_process import DataHandle ze=20) tal_examples=model.corpus_count, epochs=model...
true
true
f739ca0d6c6e60b74cbca4374745a74be5044347
10,648
py
Python
IPython/core/completerlib.py
tkf/ipython
a90f362925c92c4cf6e541e4d31edecabefc88a7
[ "BSD-3-Clause-Clear" ]
1
2018-09-24T13:45:40.000Z
2018-09-24T13:45:40.000Z
IPython/core/completerlib.py
tkf/ipython
a90f362925c92c4cf6e541e4d31edecabefc88a7
[ "BSD-3-Clause-Clear" ]
3
2015-04-01T13:14:57.000Z
2015-05-26T16:01:37.000Z
IPython/core/completerlib.py
tkf/ipython
a90f362925c92c4cf6e541e4d31edecabefc88a7
[ "BSD-3-Clause-Clear" ]
1
2017-02-03T06:22:33.000Z
2017-02-03T06:22:33.000Z
"""Implementations for various useful completers. These are all loaded by default by IPython. """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team. # # Distributed under the terms of the BSD License. # # The full license is in the ...
32.266667
79
0.567243
from __future__ import print_function import glob import inspect import os import re import sys from time import time from zipimport import zipimporter from IPython.core.completer import expand_user, compress_user from IPython.core.error import TryNext from IPython.utils import py3compat from IPython.u...
true
true
f739cb9a8109ac9db8b44e9efd16bee1d1bf51d5
7,988
py
Python
qa/rpc-tests/txn_clone.py
Ankh-Trust/credit-core
fa6fd67bdc9846cc40ee24f9a64e610e634b9356
[ "MIT" ]
2
2019-10-31T11:56:31.000Z
2019-11-02T08:48:45.000Z
qa/rpc-tests/txn_clone.py
Ankh-fdn/credit-core
fa6fd67bdc9846cc40ee24f9a64e610e634b9356
[ "MIT" ]
2
2019-11-22T18:49:20.000Z
2020-10-06T11:44:46.000Z
qa/rpc-tests/txn_clone.py
Ankh-fdn/credit-core
fa6fd67bdc9846cc40ee24f9a64e610e634b9356
[ "MIT" ]
1
2020-06-09T16:15:27.000Z
2020-06-09T16:15:27.000Z
#!/usr/bin/env python2 # Copyright (c) 2016-2017 The Duality Blockchain Solutions developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with an equivalent malleability clone # from test_framework.t...
48.412121
115
0.610666
from test_framework.test_framework import CreditTestFramework from test_framework.util import * class TxnMallTest(CreditTestFramework): def add_options(self, parser): parser.add_option("--mineblock", dest="mine_block", default=False, action="store_true", help="Test doubl...
true
true
f739cbfd641bb2dc93074bcc2bad8c1b8fe799cd
930
py
Python
docs/jnpr_healthbot_swagger/test/test_rule_schema_sensor.py
dmontagner/healthbot-py-client
0952e0a9e7ed63c9fe84879f40407c3327735252
[ "Apache-2.0" ]
10
2019-10-23T12:54:37.000Z
2022-02-07T19:24:30.000Z
docs/jnpr_healthbot_swagger/test/test_rule_schema_sensor.py
dmontagner/healthbot-py-client
0952e0a9e7ed63c9fe84879f40407c3327735252
[ "Apache-2.0" ]
5
2019-09-30T04:29:25.000Z
2022-02-16T12:21:06.000Z
docs/jnpr_healthbot_swagger/test/test_rule_schema_sensor.py
dmontagner/healthbot-py-client
0952e0a9e7ed63c9fe84879f40407c3327735252
[ "Apache-2.0" ]
4
2019-09-30T01:17:48.000Z
2020-08-25T07:27:54.000Z
# coding: utf-8 """ Healthbot APIs API interface for Healthbot application # noqa: E501 OpenAPI spec version: 1.0.0 Contact: healthbot-hackers@juniper.net Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagge...
22.682927
91
0.716129
from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.rule_schema_sensor import RuleSchemaSensor from swagger_client.rest import ApiException class TestRuleSchemaSensor(unittest.TestCase): def setUp(self): pass def tearDown(self): pas...
true
true
f739cc4c3b82647f58723e96e7dbbe791d8ff0db
1,393
py
Python
DownloadVGG_Faces.py
jfrancis71/TensorFlowApps
a9c61e2d5146c02715748221f51c656143b51b02
[ "MIT" ]
null
null
null
DownloadVGG_Faces.py
jfrancis71/TensorFlowApps
a9c61e2d5146c02715748221f51c656143b51b02
[ "MIT" ]
null
null
null
DownloadVGG_Faces.py
jfrancis71/TensorFlowApps
a9c61e2d5146c02715748221f51c656143b51b02
[ "MIT" ]
null
null
null
import os from PIL import Image import urllib.request as ur import urllib.request from io import BytesIO import requests import csv import h5py import numpy as np import argparse def retrieve_patch( rec ): response = requests.get( rec[1], timeout=10 ) file = BytesIO( response.content ) img = Image.open( fi...
27.313725
113
0.658291
import os from PIL import Image import urllib.request as ur import urllib.request from io import BytesIO import requests import csv import h5py import numpy as np import argparse def retrieve_patch( rec ): response = requests.get( rec[1], timeout=10 ) file = BytesIO( response.content ) img = Image.open( fi...
true
true
f739cc855e41b9fc0b747c1440357d1a0e856cde
14,079
bzl
Python
base/bazel/maven.bzl
qiangxu1996/vmtrace
3411c5436d0d34e6e2b84cbf0e9395ac8c55c9d4
[ "Apache-2.0" ]
1
2020-10-04T19:30:22.000Z
2020-10-04T19:30:22.000Z
base/bazel/maven.bzl
qiangxu1996/vmtrace
3411c5436d0d34e6e2b84cbf0e9395ac8c55c9d4
[ "Apache-2.0" ]
null
null
null
base/bazel/maven.bzl
qiangxu1996/vmtrace
3411c5436d0d34e6e2b84cbf0e9395ac8c55c9d4
[ "Apache-2.0" ]
2
2020-10-04T19:30:24.000Z
2020-11-04T05:58:17.000Z
load(":functions.bzl", "create_option_file", "explicit_target") def _maven_pom_impl(ctx): # Contains both *.jar and *.aar files. jars = depset() # classfied jars. Sources are in clsjars["sources"] clsjars = {} # classifier -> depset(jars) clsjars["sources"] = depset() if ctx.attr.library: ...
35.643038
139
0.589104
load(":functions.bzl", "create_option_file", "explicit_target") def _maven_pom_impl(ctx): jars = depset() clsjars = {} clsjars["sources"] = depset() if ctx.attr.library: if ctx.attr.file or ctx.attr.classified_files: fail("Cannot set both file and library for a maven_p...
true
true
f739ccecc4d7f462ed4db6d941d6bd429b68801a
609
py
Python
mc2/templatetags/mc2_tags.py
praekeltfoundation/mc2
5367a8aed309fade0f17bc72efa099b0afc76aa7
[ "BSD-2-Clause" ]
4
2016-03-09T00:51:17.000Z
2017-10-05T23:54:00.000Z
mc2/templatetags/mc2_tags.py
praekeltfoundation/mc2
5367a8aed309fade0f17bc72efa099b0afc76aa7
[ "BSD-2-Clause" ]
131
2015-11-19T16:45:23.000Z
2018-07-24T09:36:08.000Z
mc2/templatetags/mc2_tags.py
praekeltfoundation/mc2
5367a8aed309fade0f17bc72efa099b0afc76aa7
[ "BSD-2-Clause" ]
2
2016-07-30T15:36:23.000Z
2017-09-18T12:40:11.000Z
from django import template from django_gravatar.templatetags.gravatar import gravatar_url # Get template.Library instance register = template.Library() # enables the use of the gravatar_url as an assignment tag register.assignment_tag(gravatar_url) @register.simple_tag(takes_context=True) def display_name(context)...
24.36
67
0.740558
from django import template from django_gravatar.templatetags.gravatar import gravatar_url register = template.Library() register.assignment_tag(gravatar_url) @register.simple_tag(takes_context=True) def display_name(context): user = context['user'] full_name = ' '.join([user.first_name, user.last_name])....
true
true
f739ccf68584db68a8fa56e7d6e045a55b978fe7
1,558
py
Python
homeassistant/components/fritz/const.py
ysf/core
7c2f6a43485b126719b8df7edb4d9105193bb52b
[ "Apache-2.0" ]
null
null
null
homeassistant/components/fritz/const.py
ysf/core
7c2f6a43485b126719b8df7edb4d9105193bb52b
[ "Apache-2.0" ]
1
2022-03-31T06:33:02.000Z
2022-03-31T06:33:02.000Z
homeassistant/components/fritz/const.py
AjayShanker-geek/core
2242b023d383c5e8debfa813abe0871de4d30b06
[ "Apache-2.0" ]
null
null
null
"""Constants for the FRITZ!Box Tools integration.""" from typing import Literal from fritzconnection.core.exceptions import ( FritzActionError, FritzActionFailedError, FritzInternalError, FritzLookUpError, FritzServiceError, ) from homeassistant.backports.enum import StrEnum from homeassistant.co...
21.342466
63
0.756098
from typing import Literal from fritzconnection.core.exceptions import ( FritzActionError, FritzActionFailedError, FritzInternalError, FritzLookUpError, FritzServiceError, ) from homeassistant.backports.enum import StrEnum from homeassistant.const import Platform class MeshRoles(StrEnum): ...
true
true
f739cd2e996a820971f5c60d1e406e82b9a09bc2
7,404
py
Python
homeassistant/components/timer/__init__.py
lkollar/home-assistant
f4f7c25f744c0678b12acb2cc905894cca9f46ef
[ "Apache-2.0" ]
null
null
null
homeassistant/components/timer/__init__.py
lkollar/home-assistant
f4f7c25f744c0678b12acb2cc905894cca9f46ef
[ "Apache-2.0" ]
null
null
null
homeassistant/components/timer/__init__.py
lkollar/home-assistant
f4f7c25f744c0678b12acb2cc905894cca9f46ef
[ "Apache-2.0" ]
1
2020-05-12T13:35:56.000Z
2020-05-12T13:35:56.000Z
"""Support for Timers.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import CONF_ICON, CONF_NAME, SERVICE_RELOAD import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.event...
29.616
87
0.639519
from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import CONF_ICON, CONF_NAME, SERVICE_RELOAD import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.event import async_track_point_...
true
true
f739ce2a6e6760304b77efce2b6847bd3af75e62
764
py
Python
setup.py
gpauloski/ProxyStore
94946268a40132b03a17bae55766af59e442f8d4
[ "Apache-2.0" ]
2
2021-12-19T03:07:28.000Z
2022-01-27T16:42:32.000Z
setup.py
gpauloski/ProxyStore
94946268a40132b03a17bae55766af59e442f8d4
[ "Apache-2.0" ]
29
2021-04-23T20:33:03.000Z
2022-02-25T22:45:10.000Z
setup.py
gpauloski/ProxyStore
94946268a40132b03a17bae55766af59e442f8d4
[ "Apache-2.0" ]
null
null
null
"""Build ProxyStore package""" import setuptools with open('requirements.txt') as f: install_requires = f.readlines() with open('README.md') as f: long_desc = f.read() setuptools.setup( name="ProxyStore", version="0.3.0", author="Greg Pauloski", author_email="jgpauloski@uchicago.edu", des...
28.296296
76
0.679319
import setuptools with open('requirements.txt') as f: install_requires = f.readlines() with open('README.md') as f: long_desc = f.read() setuptools.setup( name="ProxyStore", version="0.3.0", author="Greg Pauloski", author_email="jgpauloski@uchicago.edu", description="Python Lazy Object Pr...
true
true
f739ce7a150eecb14150e155f791f03b18153cc5
1,612
py
Python
configs/_base_/models/liteflownet/liteflownet_pre_M6S6.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
481
2021-11-16T07:04:23.000Z
2022-03-31T22:21:21.000Z
configs/_base_/models/liteflownet/liteflownet_pre_M6S6.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
72
2021-11-16T12:25:55.000Z
2022-03-28T13:10:45.000Z
configs/_base_/models/liteflownet/liteflownet_pre_M6S6.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
48
2021-11-16T06:48:46.000Z
2022-03-30T12:46:40.000Z
model = dict( type='LiteFlowNet', encoder=dict( type='NetC', in_channels=3, pyramid_levels=[ 'level1', 'level2', 'level3', 'level4', 'level5', 'level6' ], out_channels=(32, 32, 64, 96, 128, 192), strides=(1, 2, 2, 2, 2, 2), num_convs=(1, 3, 2, ...
31
75
0.560174
model = dict( type='LiteFlowNet', encoder=dict( type='NetC', in_channels=3, pyramid_levels=[ 'level1', 'level2', 'level3', 'level4', 'level5', 'level6' ], out_channels=(32, 32, 64, 96, 128, 192), strides=(1, 2, 2, 2, 2, 2), num_convs=(1, 3, 2, ...
true
true
f739cec23468cb3e26a87e0ea60a3ce72d3977a0
12,370
py
Python
legacy-v6.0.2/log_fortiguard/fortios_log_fortiguard_override_filter.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
14
2018-09-25T20:35:25.000Z
2021-07-14T04:30:54.000Z
legacy-v6.0.2/log_fortiguard/fortios_log_fortiguard_override_filter.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
32
2018-10-09T04:13:42.000Z
2020-05-11T07:20:28.000Z
legacy-v6.0.2/log_fortiguard/fortios_log_fortiguard_override_filter.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
11
2018-10-09T00:14:53.000Z
2021-11-03T10:54:09.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
32.552632
99
0.536863
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_log_fortiguard_override_filter shor...
true
true
f739d016c17a42d4c6f409b32333eac0fd1cc295
294
py
Python
dependencies/panda/direct/particles/__init__.py
SuperM0use24/Project-Altis
8dec7518a4d3f902cee261fd522ebebc3c171a42
[ "Apache-2.0" ]
null
null
null
dependencies/panda/direct/particles/__init__.py
SuperM0use24/Project-Altis
8dec7518a4d3f902cee261fd522ebebc3c171a42
[ "Apache-2.0" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/direct/particles/__init__.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
1
2021-04-09T00:02:59.000Z
2021-04-09T00:02:59.000Z
""" This package contains the high-level Python interface to the particle system. Also see the :mod:`panda3d.physics` module, which contains the C++ implementation of the particle system. For more information about the particle system, see the :ref:`particle-effects` page in the manual. """
26.727273
79
0.772109
true
true
f739d0cf94f476745636cab0d4f068f6565cd7a1
4,166
py
Python
0_fast_bert/prediction.py
zaradana/Fast_BERT
7ee96e99ba95468c29fe3542fe8071e0402ec0f6
[ "Apache-2.0" ]
null
null
null
0_fast_bert/prediction.py
zaradana/Fast_BERT
7ee96e99ba95468c29fe3542fe8071e0402ec0f6
[ "Apache-2.0" ]
null
null
null
0_fast_bert/prediction.py
zaradana/Fast_BERT
7ee96e99ba95468c29fe3542fe8071e0402ec0f6
[ "Apache-2.0" ]
null
null
null
import os import torch from .data_cls import BertDataBunch from .data_ner import BertNERDataBunch from .learner_cls import BertLearner from .learner_ner import BertNERLearner import time from transformers import AutoTokenizer import warnings warnings.filterwarnings("ignore", message="numpy.dtype size changed") warni...
27.589404
95
0.598656
import os import torch from .data_cls import BertDataBunch from .data_ner import BertNERDataBunch from .learner_cls import BertLearner from .learner_ner import BertNERLearner import time from transformers import AutoTokenizer import warnings warnings.filterwarnings("ignore", message="numpy.dtype size changed") warni...
true
true
f739d25a0e8a088137e6a240eccd7ec73bbd7535
2,698
py
Python
Pythontutorials/30_copy_deepcopy.py
Asurada2015/Python-Data-Analysis-Learning-Notes
5697c8de3e5fd6562e77195b198b2d8ff836008e
[ "MIT" ]
2
2018-02-07T02:20:08.000Z
2019-07-07T06:21:17.000Z
Pythontutorials/30_copy_deepcopy.py
Asurada2015/Mofan_demo
5697c8de3e5fd6562e77195b198b2d8ff836008e
[ "MIT" ]
null
null
null
Pythontutorials/30_copy_deepcopy.py
Asurada2015/Mofan_demo
5697c8de3e5fd6562e77195b198b2d8ff836008e
[ "MIT" ]
3
2019-11-26T00:59:12.000Z
2021-09-09T14:40:43.000Z
"""python 中的copy分为浅复制和深复制""" import copy # # a = [1, 2, 3] # b = a # 这时候a和b指向的是硬盘中的同一片区域,用id显示的话即使id(a)==id(b) # b[1] = 22 # 改变a中值b中值会同时被改变 # print(a) # [1, 22, 3] # print(id(a) == id(b)) # True # # # deep copy # c = copy.deepcopy(a) # print(id(a) == id(c)) # False # c[1] = 2 # print(a) # [1, 22, 3] 改变c中值,a中值不会...
42.15625
129
0.723128
import copy = copy.copy(a_list) a_shallow_tuple = copy.copy(a_tuple) a1_shallow_list = copy.copy(a1_list) a1_shallow_tuple = copy.copy(a1_tuple) a_deep_list = copy.deepcopy(a_list) a_deep_tuple = copy.deepcopy(a_tuple) a1_deep_list = copy.deepcopy(a1_list) a1_deep_tuple = copy.deepcopy(a1_tuple) ...
true
true
f739d332e2cb99e4ed77993bbe8ded7eb4378317
6,463
py
Python
frameworks/cocos2d-x/tools/bindings-generator/test/test.py
Ingener74/Rocket
fa8b06b1b6cb550e352ac7dc893fbf749c58c09f
[ "MIT" ]
244
2018-05-24T07:17:29.000Z
2022-03-31T15:51:43.000Z
frameworks/cocos2d-x/tools/bindings-generator/test/test.py
Ingener74/Rocket
fa8b06b1b6cb550e352ac7dc893fbf749c58c09f
[ "MIT" ]
172
2020-02-21T08:56:42.000Z
2021-05-12T03:18:40.000Z
frameworks/cocos2d-x/tools/bindings-generator/test/test.py
Ingener74/Rocket
fa8b06b1b6cb550e352ac7dc893fbf749c58c09f
[ "MIT" ]
96
2018-08-03T15:51:52.000Z
2022-03-28T02:51:54.000Z
#!/usr/bin/python # This script is used to generate luabinding glue codes. # Android ndk version must be ndk-r9b. import sys import os, os.path import shutil import ConfigParser import subprocess import re from contextlib import contextmanager def _check_ndk_root_env(): ''' Checking the environment NDK_ROOT, w...
35.905556
132
0.622621
import sys import os, os.path import shutil import ConfigParser import subprocess import re from contextlib import contextmanager def _check_ndk_root_env(): ''' Checking the environment NDK_ROOT, which will be used for building ''' try: NDK_ROOT = os.environ['NDK_ROOT'] except Exception...
false
true
f739d3c1c432379030f4338f9565dfd19468721b
1,954
py
Python
test_package/conanfile.py
yjjnls/plugin.node.old
e17b0cbc0386e7cc76d2356219e9f7f596c1b642
[ "Apache-2.0" ]
null
null
null
test_package/conanfile.py
yjjnls/plugin.node.old
e17b0cbc0386e7cc76d2356219e9f7f596c1b642
[ "Apache-2.0" ]
null
null
null
test_package/conanfile.py
yjjnls/plugin.node.old
e17b0cbc0386e7cc76d2356219e9f7f596c1b642
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from conans import ConanFile, CMake, tools, RunEnvironment import os import platform class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" if platform.system() == "Windows": prefix='' else: ...
36.185185
206
0.567554
from conans import ConanFile, CMake, tools, RunEnvironment import os import platform class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" if platform.system() == "Windows": prefix='' else: prefix='lib' def imports(self): ...
false
true
f739d462164e17c1db876b8fdff0984c82370d5a
3,190
py
Python
ActivityManager/settings.py
AkshayVKumar/ActivityManager
e87987a532b8441b41ecc038b51e4614b8d1a526
[ "BSD-3-Clause" ]
null
null
null
ActivityManager/settings.py
AkshayVKumar/ActivityManager
e87987a532b8441b41ecc038b51e4614b8d1a526
[ "BSD-3-Clause" ]
5
2020-06-06T01:47:24.000Z
2022-02-10T14:42:15.000Z
ActivityManager/settings.py
AkshayVKumar/ActivityManager
e87987a532b8441b41ecc038b51e4614b8d1a526
[ "BSD-3-Clause" ]
null
null
null
""" Django settings for ActivityManager project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import...
25.725806
91
0.697492
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'hh-h#4=^c#^#k!%$f(o84m1mt)0*5woasgpx=5---9%_cfix49' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f739d68103d34c6c0a9961dc179a461964781ccd
10,202
py
Python
Wrappers/Python/test/test_TranslateFunction.py
rijobro/CCPi-Framework
ff08216d4e6fef84659b43155c5c52484b1dc543
[ "Apache-2.0" ]
null
null
null
Wrappers/Python/test/test_TranslateFunction.py
rijobro/CCPi-Framework
ff08216d4e6fef84659b43155c5c52484b1dc543
[ "Apache-2.0" ]
null
null
null
Wrappers/Python/test/test_TranslateFunction.py
rijobro/CCPi-Framework
ff08216d4e6fef84659b43155c5c52484b1dc543
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL). # Copyright 2017 UKRI-STFC # Copyright 2017 University of Manchester # 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 ...
37.369963
161
0.524995
from ccpi.optimisation.functions import Function, L1Norm, ScaledFunction, \ LeastSquares, L2NormSquared, \ KullbackLeibler, ZeroFunction, ConstantFunction, TranslateFunction from ccpi.optimisation.operators import Identity...
true
true
f739d6991150ce33d13f2d8387af0a800604a93f
2,626
py
Python
fairypptx/_shape/maker/__init__.py
Sillte/fairypptx
926d277e7692bcf1dd0d365e9c0e26e8d495bafb
[ "MIT" ]
null
null
null
fairypptx/_shape/maker/__init__.py
Sillte/fairypptx
926d277e7692bcf1dd0d365e9c0e26e8d495bafb
[ "MIT" ]
null
null
null
fairypptx/_shape/maker/__init__.py
Sillte/fairypptx
926d277e7692bcf1dd0d365e9c0e26e8d495bafb
[ "MIT" ]
null
null
null
from fairypptx.color import Color, make_hue_circle from fairypptx.shape import Shape, Shapes class PaletteMaker: """Make a Color Pallete. """ default_color = Color((25, 239, 198)) def __init__(self, fontsize=18, line=3, colors=None): sel...
32.02439
85
0.578446
from fairypptx.color import Color, make_hue_circle from fairypptx.shape import Shape, Shapes class PaletteMaker: default_color = Color((25, 239, 198)) def __init__(self, fontsize=18, line=3, colors=None): self.fontsize = fontsize self.li...
true
true
f739d6f4cb52300de2124bf6f0e7dc296031c8b5
10,732
py
Python
mars/scheduler/tests/test_graph.py
pingrunhuang/mars
ae920c374e9844d7426d0cc09c0d97059dc5341c
[ "Apache-2.0" ]
1
2019-09-22T16:00:48.000Z
2019-09-22T16:00:48.000Z
mars/scheduler/tests/test_graph.py
turboFei/mars
cde691285d921add5460944764c7278e7ddec8ff
[ "Apache-2.0" ]
null
null
null
mars/scheduler/tests/test_graph.py
turboFei/mars
cde691285d921add5460944764c7278e7ddec8ff
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
46.864629
110
0.633526
import contextlib import uuid import unittest import mars.tensor as mt from mars.cluster_info import ClusterInfoActor from mars.scheduler import GraphActor, GraphMetaActor, ResourceActor, ChunkMetaActor, \ AssignerActor, GraphState from mars.utils import serialize_graph, get_next_port from mars.actor...
true
true
f739d719e2562269b1ab930f373f9a3766d1f2af
2,049
py
Python
part1/main.py
haruishi43/AR-Project-OpenCV
a33f342645945fb688c7846d7da4acbf3977a2f1
[ "MIT" ]
null
null
null
part1/main.py
haruishi43/AR-Project-OpenCV
a33f342645945fb688c7846d7da4acbf3977a2f1
[ "MIT" ]
null
null
null
part1/main.py
haruishi43/AR-Project-OpenCV
a33f342645945fb688c7846d7da4acbf3977a2f1
[ "MIT" ]
null
null
null
import numpy as np import cv2 MIN_MATCHES = 20 def main(): # Compute model first model = cv2.imread('../data/model.jpg', 0) # ORB keypoint detector orb = cv2.ORB_create() # create brute force matcher object bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True) # Comp...
30.132353
118
0.574915
import numpy as np import cv2 MIN_MATCHES = 20 def main(): model = cv2.imread('../data/model.jpg', 0) orb = cv2.ORB_create() bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True) kp_model, des_model = orb.detectAndCompute(model, None) if des_model ...
true
true
f739d7b9032fdb25071a2cfc9c0e51fde44ee430
22
py
Python
treebeard_admin/__init__.py
rouxcode/django-admin-addons
cd9a2b288e4d0d8ebc42a7eb504e05572d0136cc
[ "MIT" ]
null
null
null
treebeard_admin/__init__.py
rouxcode/django-admin-addons
cd9a2b288e4d0d8ebc42a7eb504e05572d0136cc
[ "MIT" ]
1
2019-01-27T11:48:13.000Z
2019-01-27T11:48:13.000Z
src/imply/__init__.py
seddonym/imply
d5354c60d4584034f4a9aa78e6ad41c2caba3795
[ "BSD-2-Clause" ]
null
null
null
__version__ = '1.0a3'
11
21
0.681818
__version__ = '1.0a3'
true
true
f739d8a3335f4c422d4015a204f41031d39c511b
871
py
Python
amolf/plotting/Histogram.py
Repythory/Libraries
d5f01267a5f396bd0d74b6291f4552bcc6790777
[ "BSD-2-Clause" ]
null
null
null
amolf/plotting/Histogram.py
Repythory/Libraries
d5f01267a5f396bd0d74b6291f4552bcc6790777
[ "BSD-2-Clause" ]
null
null
null
amolf/plotting/Histogram.py
Repythory/Libraries
d5f01267a5f396bd0d74b6291f4552bcc6790777
[ "BSD-2-Clause" ]
null
null
null
def joinprob3d(ff, T1 = 2*pi): """ Given the 2d histogram (ff) of two datasets, this function gives back the join probability as 3d plot with the corresponding axis. Author: Michele Monti Args: ff: (list) is the output of histogram2d, ff[0] is the distribution from histogram2d to 3d plot, ff[1] is the x...
27.21875
131
0.660161
def joinprob3d(ff, T1 = 2*pi): distribution = ff[0] fig = plt.figure() ax = fig.gca(projection = '3d') X, Y = meshgrid(ff[2][:-1], ff[1][:-1]) Gx, Gy = gradient(distribution) G = (Gx**2 + Gy**2) ** 0.5 N = G/G.max() surf = ax.plot_surface(X, Y, distribution, rstride = 1, cstride = 1, facecolors = cm.j...
true
true
f739d8aa611bd23754987f56fdd1d8b3709b35c2
3,445
py
Python
catalyst/contrib/data/augmentor.py
and-kul/catalyst
51428d7756e62b9b8ee5379f38e9fd576eeb36e5
[ "Apache-2.0" ]
2
2019-04-19T21:34:31.000Z
2019-05-02T22:50:25.000Z
catalyst/contrib/data/augmentor.py
and-kul/catalyst
51428d7756e62b9b8ee5379f38e9fd576eeb36e5
[ "Apache-2.0" ]
1
2021-01-07T16:13:45.000Z
2021-01-21T09:27:54.000Z
catalyst/contrib/data/augmentor.py
and-kul/catalyst
51428d7756e62b9b8ee5379f38e9fd576eeb36e5
[ "Apache-2.0" ]
1
2020-12-02T18:42:31.000Z
2020-12-02T18:42:31.000Z
from typing import Callable, Dict, List, Union class Augmentor: """Augmentation abstraction to use with data dictionaries.""" def __init__( self, dict_key: str, augment_fn: Callable, input_key: str = None, output_key: str = None, **kwargs, ): """ ...
28.708333
73
0.571553
from typing import Callable, Dict, List, Union class Augmentor: def __init__( self, dict_key: str, augment_fn: Callable, input_key: str = None, output_key: str = None, **kwargs, ): self.dict_key = dict_key self.augment_fn = augment_fn se...
true
true
f739d8bc92803c90617af9225aeb07b3a67061cf
2,092
py
Python
Stage_Five_Python_Package/Welcome.py
ChrisVicky/CodingHomeWork2020
b8946c1d32c3aaecb3de5cc8247a9e5a4653a778
[ "Apache-2.0" ]
1
2021-01-02T11:02:46.000Z
2021-01-02T11:02:46.000Z
Stage_Five_Python_Package/Welcome.py
ChrisVicky/CodingHomeWork2020
b8946c1d32c3aaecb3de5cc8247a9e5a4653a778
[ "Apache-2.0" ]
null
null
null
Stage_Five_Python_Package/Welcome.py
ChrisVicky/CodingHomeWork2020
b8946c1d32c3aaecb3de5cc8247a9e5a4653a778
[ "Apache-2.0" ]
null
null
null
import FindTag import requests import re def Introduction(): print("欢迎使用本程序 copyright: 刘锦帆 20级 工科班 天津大学") print("本程序满足二次元爱好者收集二次元图片的需求,顺便增加了将图片制成头像的功能") print("首先,通过简单的 Python 爬虫 从[k站](著名二次元图片网站) [https://konachan.net/post] 抓取并下载二次元图片") print("然后,利用 open-CV [https://github.com/nagadomi/lbpcascade_a...
31.69697
95
0.607553
import FindTag import requests import re def Introduction(): print("欢迎使用本程序 copyright: 刘锦帆 20级 工科班 天津大学") print("本程序满足二次元爱好者收集二次元图片的需求,顺便增加了将图片制成头像的功能") print("首先,通过简单的 Python 爬虫 从[k站](著名二次元图片网站) [https://konachan.net/post] 抓取并下载二次元图片") print("然后,利用 open-CV [https://github.com/nagadomi/lbpcascade_a...
true
true
f739d96422796ebb23b63018a6c76aab635d7a20
30
py
Python
modularrh/hello.py
henriklindgren/python-inspect-classes
3247812bc36c9d6bb0b8273f3f779f1a84260b8d
[ "Apache-2.0" ]
null
null
null
modularrh/hello.py
henriklindgren/python-inspect-classes
3247812bc36c9d6bb0b8273f3f779f1a84260b8d
[ "Apache-2.0" ]
null
null
null
modularrh/hello.py
henriklindgren/python-inspect-classes
3247812bc36c9d6bb0b8273f3f779f1a84260b8d
[ "Apache-2.0" ]
null
null
null
class Hello(object): pass
10
20
0.666667
class Hello(object): pass
true
true
f739dad43a507385a9797dbb8a81b214cdc097f6
11,815
py
Python
app/api/views/processor.py
rrozek/image_playground
3486785c1b22e600b7c91e7c6885b5b72a8da328
[ "MIT" ]
null
null
null
app/api/views/processor.py
rrozek/image_playground
3486785c1b22e600b7c91e7c6885b5b72a8da328
[ "MIT" ]
null
null
null
app/api/views/processor.py
rrozek/image_playground
3486785c1b22e600b7c91e7c6885b5b72a8da328
[ "MIT" ]
null
null
null
import os.path import typing import subprocess import base64 from django.conf import settings from django.core.files.storage import default_storage from django.http import HttpResponse from django.urls.base import resolve from django.views.decorators.csrf import csrf_exempt from drf_yasg.openapi import Parameter from d...
39.51505
158
0.652306
import os.path import typing import subprocess import base64 from django.conf import settings from django.core.files.storage import default_storage from django.http import HttpResponse from django.urls.base import resolve from django.views.decorators.csrf import csrf_exempt from drf_yasg.openapi import Parameter from d...
true
true
f739daf96625eab4d26909f01a851f398faca1d4
92
py
Python
webapi/apps.py
erisenlee/django_rest
e358a80f7a7d9214decb7756e2a7838727d025a6
[ "Apache-2.0" ]
null
null
null
webapi/apps.py
erisenlee/django_rest
e358a80f7a7d9214decb7756e2a7838727d025a6
[ "Apache-2.0" ]
null
null
null
webapi/apps.py
erisenlee/django_rest
e358a80f7a7d9214decb7756e2a7838727d025a6
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class WebapiConfig(AppConfig): name = 'webapi'
15.333333
34
0.706522
from django.apps import AppConfig class WebapiConfig(AppConfig): name = 'webapi'
true
true
f739dc43a3b5dc86bc24302e5ffba6affbd418f0
603
py
Python
user/migrations/0004_auto_20200720_1302.py
MohammadReza-Jafari/Gizshop_api
f2dc895a32d5964e7d4d27da5172f132b511b7ee
[ "MIT" ]
null
null
null
user/migrations/0004_auto_20200720_1302.py
MohammadReza-Jafari/Gizshop_api
f2dc895a32d5964e7d4d27da5172f132b511b7ee
[ "MIT" ]
5
2021-04-08T21:57:34.000Z
2022-02-10T12:43:03.000Z
user/migrations/0004_auto_20200720_1302.py
MohammadReza-Jafari/Gizshop_api
f2dc895a32d5964e7d4d27da5172f132b511b7ee
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-07-20 08:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20200720_1241'), ] operations = [ migrations.AlterField( model_name='customuser', name='national_cod...
25.125
74
0.600332
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20200720_1241'), ] operations = [ migrations.AlterField( model_name='customuser', name='national_code', field=models.CharField(max_le...
true
true
f739dd52f32fd2f369e45dfce015fb59aa8b84fb
3,558
py
Python
genesis/DDChar.py
Zaltu/content-generator
23921dad5a95e4d58bae1c2231c5db985ae7ec2e
[ "MIT" ]
null
null
null
genesis/DDChar.py
Zaltu/content-generator
23921dad5a95e4d58bae1c2231c5db985ae7ec2e
[ "MIT" ]
null
null
null
genesis/DDChar.py
Zaltu/content-generator
23921dad5a95e4d58bae1c2231c5db985ae7ec2e
[ "MIT" ]
null
null
null
""" Module to generate random D&D characters. """ import os import math import random import aigis import fantasyName DEFAULT_PLAYER_NAME = "Dungeon Master" DEFAULT_SAVE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "tmp")) CHAR_ATTR_NAMES = {"strength", "dexterity", "intelligence", "wisdom", "const...
30.410256
100
0.643058
import os import math import random import aigis import fantasyName DEFAULT_PLAYER_NAME = "Dungeon Master" DEFAULT_SAVE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "tmp")) CHAR_ATTR_NAMES = {"strength", "dexterity", "intelligence", "wisdom", "constitution", "charisma"} if not os.path.exists(os.p...
true
true
f739de6e101d5c61269e2fa1298c6f77d44ad57e
6,008
py
Python
trancesection/scrapers.py
xuorig/trancesection
a7d353bf1bc3bd4598a2b70ee9413cff7d497fc4
[ "MIT" ]
null
null
null
trancesection/scrapers.py
xuorig/trancesection
a7d353bf1bc3bd4598a2b70ee9413cff7d497fc4
[ "MIT" ]
null
null
null
trancesection/scrapers.py
xuorig/trancesection
a7d353bf1bc3bd4598a2b70ee9413cff7d497fc4
[ "MIT" ]
null
null
null
#!/usr/bin/python from bs4 import BeautifulSoup from urllib2 import urlopen from trancesection import app import xml.etree.ElementTree as et from multiprocessing.dummy import Pool as ThreadPool from copy_reg import pickle from types import MethodType from trancesection import db from trancesection.models import Podca...
31.78836
109
0.588382
from bs4 import BeautifulSoup from urllib2 import urlopen from trancesection import app import xml.etree.ElementTree as et from multiprocessing.dummy import Pool as ThreadPool from copy_reg import pickle from types import MethodType from trancesection import db from trancesection.models import Podcast, Episode, Trac...
false
true
f739de75a3cf69f888c94aa5f38ccd86cabff331
454
py
Python
src/package/__main__.py
behnazh/python-package-template
32248a470e31a596357e68f04119cb8f9614d0a4
[ "MIT" ]
13
2021-09-29T08:10:35.000Z
2022-03-26T08:14:12.000Z
src/package/__main__.py
behnazh/python-package-template
32248a470e31a596357e68f04119cb8f9614d0a4
[ "MIT" ]
114
2021-09-29T11:26:15.000Z
2022-03-31T22:37:28.000Z
src/package/__main__.py
behnazh/python-package-template
32248a470e31a596357e68f04119cb8f9614d0a4
[ "MIT" ]
5
2021-09-29T21:53:19.000Z
2022-03-28T12:00:59.000Z
"""The main entry point into this package when run as a script.""" # For more details, see also # https://docs.python.org/3/library/runpy.html # https://docs.python.org/3/reference/import.html#special-considerations-for-main import os import sys from .something import Something def main(): """Execute the Somet...
21.619048
81
0.713656
mething import Something def main(): _ = Something.do_something() if __name__ == "__main__": main() sys.exit(os.EX_OK)
true
true
f739decb955aebb96c819ef667b45050ddd6f4c7
6,834
py
Python
tests/perf-pulsar-tests/pulsar-gentest_10k_16p_100_rate_2min.py
jingerbread/p3_test_driver
aa1fbd52bcb502cac013d38d267be66f0dbd693e
[ "Apache-2.0" ]
null
null
null
tests/perf-pulsar-tests/pulsar-gentest_10k_16p_100_rate_2min.py
jingerbread/p3_test_driver
aa1fbd52bcb502cac013d38d267be66f0dbd693e
[ "Apache-2.0" ]
null
null
null
tests/perf-pulsar-tests/pulsar-gentest_10k_16p_100_rate_2min.py
jingerbread/p3_test_driver
aa1fbd52bcb502cac013d38d267be66f0dbd693e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import json import sys test_list = [] localWorker = False tarball = '../package/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz' build = False # Run 10kb 100 rate 16 partitions 2min # "workload": { # "consumerBacklogSizeGB": 0, # "consumer...
62.127273
219
0.37372
from __future__ import print_function import json import sys test_list = [] localWorker = False tarball = '../package/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz' build = False for repeat in range(1): for producerWorkers in [2]: numWorkers = 0 if localWorker else producerWorke...
true
true
f739df0d02c431262465c9f9cddbb2964b329c63
1,077
py
Python
twitoff/predict.py
EEdwardsA/Twitoff
e1c2613c233e81c5aa50fecb89e90c75b9bbdd01
[ "MIT" ]
null
null
null
twitoff/predict.py
EEdwardsA/Twitoff
e1c2613c233e81c5aa50fecb89e90c75b9bbdd01
[ "MIT" ]
null
null
null
twitoff/predict.py
EEdwardsA/Twitoff
e1c2613c233e81c5aa50fecb89e90c75b9bbdd01
[ "MIT" ]
null
null
null
"""Prediction of Users based on tweet embeddings""" import numpy as np from sklearn.linear_model import LogisticRegression from .models import User from .twitter import vectorize_tweet def predict_user(user0_name, user1_name, hypo_tweet_text): """ Determine and return which user is more likely to say a hypoth...
35.9
78
0.714949
import numpy as np from sklearn.linear_model import LogisticRegression from .models import User from .twitter import vectorize_tweet def predict_user(user0_name, user1_name, hypo_tweet_text): user0 = User.query.filter(User.name == user0_name).one() user1 = User.query.filter(User.name == user1_name).one()...
true
true
f739df2e27a2025e12785cdcbc5aea000c0d7616
9,220
py
Python
docs/conf.py
adamtupper/pyneat
12bf2bf936602c0da7c40cfcb99aced2eb981faa
[ "MIT" ]
null
null
null
docs/conf.py
adamtupper/pyneat
12bf2bf936602c0da7c40cfcb99aced2eb981faa
[ "MIT" ]
null
null
null
docs/conf.py
adamtupper/pyneat
12bf2bf936602c0da7c40cfcb99aced2eb981faa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import os impo...
33.649635
85
0.703254
import os import sys import inspect import shutil import sphinx_rtd_theme __location__ = os.path.join(os.getcwd(), os.path.dirname( inspect.getfile(inspect.currentframe()))) sys.path.insert(0, os.path.join(__location__, '../src')) # setup.py install" in the RTD Advanced Settings. # Additionally...
true
true
f739e05d1ddd698ac486fa39441422e162da3200
308
py
Python
pyobjc_core-3.3a0-py3.6-macosx-10.13-x86_64.egg/objc/_machsignals.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
pyobjc_core-3.3a0-py3.6-macosx-10.13-x86_64.egg/objc/_machsignals.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
pyobjc_core-3.3a0-py3.6-macosx-10.13-x86_64.egg/objc/_machsignals.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, '_machsignals.cpython-36dm-darwin.so') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
38.5
95
0.775974
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, '_machsignals.cpython-36dm-darwin.so') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
true
true
f739e0f6cbe53359e04eb92aacc4dd17a0af9a17
1,030
py
Python
qiushaoyi/programs/qsy_program_codes/aqi_study.py
qsyPython/Python_play_now
278b6d5d30082f8f93b26902c854737c4919405a
[ "MIT" ]
2
2018-03-29T08:26:17.000Z
2019-06-17T10:56:19.000Z
qiushaoyi/programs/qsy_program_codes/aqi_study.py
qsyPython/Python_play_now
278b6d5d30082f8f93b26902c854737c4919405a
[ "MIT" ]
1
2022-03-22T20:26:08.000Z
2022-03-22T20:26:08.000Z
qiushaoyi/programs/qsy_program_codes/aqi_study.py
qsyPython/Python_play_now
278b6d5d30082f8f93b26902c854737c4919405a
[ "MIT" ]
1
2019-02-18T10:44:20.000Z
2019-02-18T10:44:20.000Z
import requests, csv from bs4 import BeautifulSoup import pandas as pd import matplotlib as plt def get_html_text(url): ''' 获取html文本 ''' r = requests.get(url, timeout=30) # print('验证码:'r.status_code) return r.text def process_cvs_w_file(filepath, file_list): ''' 把数据写成csv文件 ...
26.410256
100
0.656311
import requests, csv from bs4 import BeautifulSoup import pandas as pd import matplotlib as plt def get_html_text(url): r = requests.get(url, timeout=30) return r.text def process_cvs_w_file(filepath, file_list): with open(filepath, mode='w', encoding='utf-8', newline='') as f: writer = csv...
true
true
f739e241dc63d227d2bcd389328ed72c0a2fead1
2,870
py
Python
python/hostconfig/machines/hardyvm.py
DGermano8/ChasteDom
539a3a811698214c0938489b0cfdffd1abccf667
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
python/hostconfig/machines/hardyvm.py
DGermano8/ChasteDom
539a3a811698214c0938489b0cfdffd1abccf667
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
python/hostconfig/machines/hardyvm.py
DGermano8/ChasteDom
539a3a811698214c0938489b0cfdffd1abccf667
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# Configuration for Joe's machines """Copyright (c) 2005-2018, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution...
40.422535
107
0.74669
import os petsc_2_2_path = None petsc_2_3_path = '../../petsc-2.3.2-p10/' petsc_3_0_path = None petsc_build_name = 'linux-gnu' petsc_build_name_optimized = 'linux-gnu-opt' petsc_build_name_production = 'linux-intel-opt-mkl' dealii_path = None parmetis_path = '../../ParMetis-3.1' intel_path = '' icpc = 'icpc' oth...
true
true
f739e2dd146c85bcd5ee3ffcd6caec4faa911ff9
337
py
Python
dec q4.py
Manthanc007/APS-2o2o
a84337c4e658a93b6c67515fa3ef59b09f2e5e94
[ "MIT" ]
null
null
null
dec q4.py
Manthanc007/APS-2o2o
a84337c4e658a93b6c67515fa3ef59b09f2e5e94
[ "MIT" ]
null
null
null
dec q4.py
Manthanc007/APS-2o2o
a84337c4e658a93b6c67515fa3ef59b09f2e5e94
[ "MIT" ]
null
null
null
T=int(input()) while(T>0): T=T-1 i=0 j=0 k=0 l=[] N=int(input()) while(N>0): N=N-1 i=i+1 j=j+1 k=k+1 print(1,i,j,k,flush=True) r=int(input()) l.append(r) print(2,*l,flush=True) s=int(input()) if(s==-1):...
15.318182
34
0.364985
T=int(input()) while(T>0): T=T-1 i=0 j=0 k=0 l=[] N=int(input()) while(N>0): N=N-1 i=i+1 j=j+1 k=k+1 print(1,i,j,k,flush=True) r=int(input()) l.append(r) print(2,*l,flush=True) s=int(input()) if(s==-1):...
true
true
f739e3e1366fcb3aae284345d865741b9db2bbb6
1,230
py
Python
lnbits/extensions/tpos/crud.py
sidahmedabdelillah/attigoBTC
f121184bab7f4704b54eff6d0ac27afa1ed524ed
[ "MIT" ]
null
null
null
lnbits/extensions/tpos/crud.py
sidahmedabdelillah/attigoBTC
f121184bab7f4704b54eff6d0ac27afa1ed524ed
[ "MIT" ]
null
null
null
lnbits/extensions/tpos/crud.py
sidahmedabdelillah/attigoBTC
f121184bab7f4704b54eff6d0ac27afa1ed524ed
[ "MIT" ]
null
null
null
from typing import List, Optional, Union from lnbits.helpers import urlsafe_short_hash from . import db from .models import TPoS async def create_tpos(*, wallet_id: str, name: str, currency: str) -> TPoS: tpos_id = urlsafe_short_hash() await db.execute( """ INSERT INTO tpos.tposs...
28.604651
81
0.618699
from typing import List, Optional, Union from lnbits.helpers import urlsafe_short_hash from . import db from .models import TPoS async def create_tpos(*, wallet_id: str, name: str, currency: str) -> TPoS: tpos_id = urlsafe_short_hash() await db.execute( """ INSERT INTO tpos.tposs...
true
true
f739e4231f10a51448e8312440aea0bc5a1990e6
16,345
py
Python
paramiko_expect.py
dgonzalez-cs/paramiko-expect
a485a8ac851b106f97d9e4514a47cbe4eccabb0f
[ "MIT" ]
158
2015-01-13T04:08:24.000Z
2022-03-31T03:18:58.000Z
paramiko_expect.py
dgonzalez-cs/paramiko-expect
a485a8ac851b106f97d9e4514a47cbe4eccabb0f
[ "MIT" ]
72
2015-01-30T01:00:28.000Z
2022-02-13T09:47:23.000Z
paramiko_expect.py
dgonzalez-cs/paramiko-expect
a485a8ac851b106f97d9e4514a47cbe4eccabb0f
[ "MIT" ]
86
2015-02-23T18:46:16.000Z
2022-03-04T12:25:03.000Z
# # Paramiko Expect # # Written by Fotis Gimian # http://github.com/fgimian # # This library works with a Paramiko SSH channel to provide native SSH # expect-like handling for servers. The library may be used to interact # with commands like 'configure' or Cisco IOS devices or with interactive # Unix scripts or comman...
41.803069
112
0.581707
from __future__ import unicode_literals import codecs import sys import re import socket import struct import time try: import termios import tty has_termios = True MAX_TIMEOUT = 2 ** (struct.Struct(str('i')).size * 8 - 1) - 1 except ImportError: import threading has_termios = ...
true
true
f739e43acfbc6a465c6846deca9594c01555a2d0
2,019
py
Python
components/cloud/aws/cbmc/proofs/make_cbmc_batch_files.py
flyghost/OneOS-V2.1.0
6fedab0558c07fe679d63ba1eb8ee9992c044d86
[ "Apache-2.0" ]
1
2022-03-26T09:59:37.000Z
2022-03-26T09:59:37.000Z
components/cloud/aws/cbmc/proofs/make_cbmc_batch_files.py
flyghost/OneOS-V2.1.0
6fedab0558c07fe679d63ba1eb8ee9992c044d86
[ "Apache-2.0" ]
1
2021-06-24T04:27:40.000Z
2021-06-24T04:27:40.000Z
components/cloud/aws/cbmc/proofs/make_cbmc_batch_files.py
flyghost/OneOS-V2.1.0
6fedab0558c07fe679d63ba1eb8ee9992c044d86
[ "Apache-2.0" ]
2
2021-06-24T04:08:28.000Z
2022-03-07T06:37:24.000Z
#!/usr/bin/env python3 # # Generation of the cbmc-batch.yaml files for the CBMC proofs. # # Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software")...
41.204082
80
0.698861
import os import platform import subprocess import logging MAKEFILE = "Makefile" YAML_FILE = "cbmc-batch.yaml" def create_cbmc_yaml_files(): if platform.system() == "Windows": return for dyr, _, files in os.walk("."): if YAML_FILE in files and MAKEFILE in files: ...
true
true
f739e57e3e5ae3ed4ad51629aeaff4624374b766
105
py
Python
gitz_doc/dirs.py
rec/gitz
cbb07f99dd002c85b5ca95896b33d03150bf9282
[ "MIT" ]
24
2019-07-26T03:57:16.000Z
2021-11-22T22:39:13.000Z
gitz_doc/dirs.py
rec/gitz
cbb07f99dd002c85b5ca95896b33d03150bf9282
[ "MIT" ]
212
2019-06-13T13:44:26.000Z
2020-06-02T17:59:51.000Z
gitz_doc/dirs.py
rec/gitz
cbb07f99dd002c85b5ca95896b33d03150bf9282
[ "MIT" ]
2
2019-08-09T13:55:38.000Z
2019-09-07T11:17:59.000Z
from pathlib import Path HOME = Path(__file__).parent.parent DOC = HOME / 'doc' MAN = HOME / 'man/man1'
17.5
35
0.695238
from pathlib import Path HOME = Path(__file__).parent.parent DOC = HOME / 'doc' MAN = HOME / 'man/man1'
true
true
f739e693bbbb5b47420ba4555a24c7e6139e4ffb
3,570
py
Python
bindings/python/ensmallen/datasets/string/propionimicrobiumspbv2f7.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/propionimicrobiumspbv2f7.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/propionimicrobiumspbv2f7.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Propionimicrobium sp. BV2F7. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--pr...
33.055556
223
0.677871
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def PropionimicrobiumSpBv2f7( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/...
true
true
f739e69877b6e88120e1d59493b398b233abd828
1,058
py
Python
build/lib/rdd/test.py
darrelrobinson/rdd
54b9c328087ae22ac38073aab2ee930459b2364a
[ "MIT" ]
46
2019-02-24T20:31:11.000Z
2022-03-30T08:03:10.000Z
build/lib/rdd/test.py
darrelrobinson/rdd
54b9c328087ae22ac38073aab2ee930459b2364a
[ "MIT" ]
8
2019-05-22T16:36:20.000Z
2019-11-02T15:55:01.000Z
build/lib/rdd/test.py
darrelrobinson/rdd
54b9c328087ae22ac38073aab2ee930459b2364a
[ "MIT" ]
17
2019-01-18T13:17:47.000Z
2022-03-07T01:45:18.000Z
import numpy as np import pandas as pd import matplotlib.pyplot as plt import functions as rdd ''' To Do: - Put testing functions in another folder - test different input types, combos of bad items, etc ''' # Set seed np.random.seed(42) # Simulate data N = 10000 # x = np.random.uniform(-.5, .5, N) x = np....
21.591837
66
0.642722
import numpy as np import pandas as pd import matplotlib.pyplot as plt import functions as rdd np.random.seed(42) N = 10000 x = np.random.normal(0, 1, N) epsilon = np.random.normal(0, 1, N) forcing = np.round(x+.5) y = .5 * forcing + 2 * x + 1 + epsilon w1 = np.random.normal(0, 1, N) w2 = np.random.normal(0, 4, ...
true
true
f739e6d00f052c9c6193859d2752eee192484bc2
424
py
Python
QT/pyside_test.py
ValRCS/RCS_Python_11
157c8e08aaf9849341cadb50077fe65dead536fa
[ "MIT" ]
null
null
null
QT/pyside_test.py
ValRCS/RCS_Python_11
157c8e08aaf9849341cadb50077fe65dead536fa
[ "MIT" ]
null
null
null
QT/pyside_test.py
ValRCS/RCS_Python_11
157c8e08aaf9849341cadb50077fe65dead536fa
[ "MIT" ]
2
2019-12-11T14:39:36.000Z
2019-12-13T14:29:09.000Z
import PySide2.QtCore # Prints PySide2 version # e.g. 5.11.1a1 print(PySide2.__version__) # Gets a tuple with each version component # e.g. (5, 11, 1, 'a', 1) print(PySide2.__version_info__) # Prints the Qt version used to compile PySide2 # e.g. "5.11.2" print(PySide2.QtCore.__version__) # Gets a tuple with each ve...
23.555556
73
0.735849
import PySide2.QtCore print(PySide2.__version__) print(PySide2.__version_info__) print(PySide2.QtCore.__version__) print(PySide2.QtCore.__version_info__)
true
true
f739e7a1101eb5c696e2190eceea8d2d9114135b
202
py
Python
test.py
Curt-H/bilidown
9d2d0e4adea8172f0f5c69fc4e72d1eaa9ba2a76
[ "MIT" ]
null
null
null
test.py
Curt-H/bilidown
9d2d0e4adea8172f0f5c69fc4e72d1eaa9ba2a76
[ "MIT" ]
null
null
null
test.py
Curt-H/bilidown
9d2d0e4adea8172f0f5c69fc4e72d1eaa9ba2a76
[ "MIT" ]
null
null
null
{"code":0,"message":"0","ttl":1,"data":[{"cid":260839008,"page":1,"from":"vupload","part":"PocketLCD_with_srt","duration":467,"vid":"","weblink":"","dimension":{"width":1920,"height":1080,"rotate":0}}]}
202
202
0.628713
{"code":0,"message":"0","ttl":1,"data":[{"cid":260839008,"page":1,"from":"vupload","part":"PocketLCD_with_srt","duration":467,"vid":"","weblink":"","dimension":{"width":1920,"height":1080,"rotate":0}}]}
true
true
f739e804d6bc7fe67793b8b0f8753bba78ac200d
4,072
py
Python
examples/Old Code/run_follower_stopper_ring.py
georgegunter/flow
15848ec9bafd250364a51fa162786037645b19bf
[ "MIT" ]
null
null
null
examples/Old Code/run_follower_stopper_ring.py
georgegunter/flow
15848ec9bafd250364a51fa162786037645b19bf
[ "MIT" ]
null
null
null
examples/Old Code/run_follower_stopper_ring.py
georgegunter/flow
15848ec9bafd250364a51fa162786037645b19bf
[ "MIT" ]
null
null
null
from flow.controllers import FollowerStopper, IDMController, ContinuousRouter, OVMController from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams from flow.core.params import VehicleParams from flow.envs.ring.accel import AccelEnv, ADDITIONAL_ENV_PARAMS from flow.networks.ring import RingNetwork...
24.53012
117
0.711444
from flow.controllers import FollowerStopper, IDMController, ContinuousRouter, OVMController from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams from flow.core.params import VehicleParams from flow.envs.ring.accel import AccelEnv, ADDITIONAL_ENV_PARAMS from flow.networks.ring import RingNetwork...
true
true
f739e810378e3ef9bf5e8fdd4b5a50f8df17f877
2,569
py
Python
cvxpy/atoms/affine/unary_operators.py
hashstat/cvxpy
20d667ebe8614821fa38e41b1e333257512d9594
[ "ECL-2.0", "Apache-2.0" ]
1
2021-05-28T16:41:11.000Z
2021-05-28T16:41:11.000Z
cvxpy/atoms/affine/unary_operators.py
h-vetinari/cvxpy
86307f271819bb78fcdf64a9c3a424773e8269fa
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/atoms/affine/unary_operators.py
h-vetinari/cvxpy
86307f271819bb78fcdf64a9c3a424773e8269fa
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
""" Copyright 2013 Steven Diamond 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...
27.623656
80
0.63371
from typing import Tuple from cvxpy.atoms.affine.affine_atom import AffAtom import cvxpy.lin_ops.lin_utils as lu import operator as op class UnaryOperator(AffAtom): def __init__(self, expr) -> None: super(UnaryOperator, self).__init__(expr) def name(self): return self.OP_NAME + self.args[0]...
true
true
f739e862cb96882f0b300910618dec5ecb95f3ce
28,263
py
Python
src/search_engine/relja_retrival/external/pypar_2.1.4_94/source/pypar.py
kaloyan13/vise2
833a8510c7cbac3cbb8ac4569fd51448906e62f3
[ "BSD-2-Clause" ]
null
null
null
src/search_engine/relja_retrival/external/pypar_2.1.4_94/source/pypar.py
kaloyan13/vise2
833a8510c7cbac3cbb8ac4569fd51448906e62f3
[ "BSD-2-Clause" ]
null
null
null
src/search_engine/relja_retrival/external/pypar_2.1.4_94/source/pypar.py
kaloyan13/vise2
833a8510c7cbac3cbb8ac4569fd51448906e62f3
[ "BSD-2-Clause" ]
5
2019-09-02T14:54:16.000Z
2021-01-13T17:36:01.000Z
# ============================================================================= # pypar.py - Parallel Python using MPI # Copyright (C) 2001, 2002, 2003 Ole M. Nielsen # (Center for Mathematics and its Applications ANU and APAC) # # This program is free software; you can redistribute it and/or modify # ...
32.007928
159
0.589145
"""Module pypar.py - Parallel Python using MPI Public functions: size() -- Number of processors rank() -- Id of current processor get_processor_name() -- Return host name of current node send() -- Blocking send (all types) receive() -- Blocking receive (all types) broadcast() -- Broadcast t...
false
true
f739e8c0cdbab17b8c0d325ceb1c088852a1d813
223
py
Python
mozmill-env/python/Lib/site-packages/mozmill_automation/__init__.py
lucashmorais/x-Bench
2080b8753dd6e45c2212666bcdb05327752a94e9
[ "MIT" ]
null
null
null
mozmill-env/python/Lib/site-packages/mozmill_automation/__init__.py
lucashmorais/x-Bench
2080b8753dd6e45c2212666bcdb05327752a94e9
[ "MIT" ]
null
null
null
mozmill-env/python/Lib/site-packages/mozmill_automation/__init__.py
lucashmorais/x-Bench
2080b8753dd6e45c2212666bcdb05327752a94e9
[ "MIT" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from testrun import *
31.857143
75
0.726457
from testrun import *
true
true
f739e943b254657ba870ee727b94a4a77dd4fbe2
8,450
py
Python
test/functional/wallet_import_rescan.py
EnzoNodes/ENZO
3f607ab55261ec22a02f3eba4b32699eed187620
[ "MIT" ]
null
null
null
test/functional/wallet_import_rescan.py
EnzoNodes/ENZO
3f607ab55261ec22a02f3eba4b32699eed187620
[ "MIT" ]
null
null
null
test/functional/wallet_import_rescan.py
EnzoNodes/ENZO
3f607ab55261ec22a02f3eba4b32699eed187620
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test wallet import RPCs. Test rescan behavior of importaddress, importpubkey, importprivkey, and impor...
47.206704
116
0.665444
from test_framework.test_framework import enzoTestFramework from test_framework.util import (assert_raises_rpc_error, connect_nodes, assert_equal, set_node_times) import collections import enum import itertools Call = enum.Enum("Call", "single") Data = enum.Enum("Data", "address pub priv") Rescan = enum.Enum("Re...
true
true
f739e9c686022d42f710bf3f3f3b03cc2857019e
1,051
py
Python
src/minterpy/transformations/lagrange.py
karanprime/minterpy
75d8976b2ddcf79ebaa29b4cb80691ca02a6d180
[ "MIT" ]
13
2021-11-30T17:52:45.000Z
2021-12-09T10:05:20.000Z
src/minterpy/transformations/lagrange.py
karanprime/minterpy
75d8976b2ddcf79ebaa29b4cb80691ca02a6d180
[ "MIT" ]
2
2021-11-30T18:31:22.000Z
2022-02-10T10:13:37.000Z
src/minterpy/transformations/lagrange.py
karanprime/minterpy
75d8976b2ddcf79ebaa29b4cb80691ca02a6d180
[ "MIT" ]
6
2021-11-30T18:17:26.000Z
2022-02-18T17:38:27.000Z
""" Concrete implementations of the Transformation classes for the LagrangePolynomial. Transformations from Lagrange basis to Newton and Canonical basis are provided. """ from minterpy.core.ABC import TransformationABC from minterpy.polynomials import CanonicalPolynomial, NewtonPolynomial from minterpy.polynomials.lag...
32.84375
82
0.830637
from minterpy.core.ABC import TransformationABC from minterpy.polynomials import CanonicalPolynomial, NewtonPolynomial from minterpy.polynomials.lagrange_polynomial import LagrangePolynomial from .utils import ( _build_lagrange_to_canonical_operator, _build_lagrange_to_newton_operator, ) __all__ = ["LagrangeT...
true
true
f739eac7efc6ee406318befd409dd3b0d31f696f
3,952
py
Python
service.py
nekotarolu/my-idea-io
728c03ef2ac60cf88ea350ed8059a5f6202082e0
[ "MIT" ]
null
null
null
service.py
nekotarolu/my-idea-io
728c03ef2ac60cf88ea350ed8059a5f6202082e0
[ "MIT" ]
null
null
null
service.py
nekotarolu/my-idea-io
728c03ef2ac60cf88ea350ed8059a5f6202082e0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import os import sqlite3 import urllib.parse from bottle import route, request, abort, run, response, redirect, static_file, template, TEMPLATE_PATH import config import model import sys TEMPLATE_PATH.append("./template") @route("/") def welcome_service(): print("config....
26.52349
107
0.635881
 import datetime import os import sqlite3 import urllib.parse from bottle import route, request, abort, run, response, redirect, static_file, template, TEMPLATE_PATH import config import model import sys TEMPLATE_PATH.append("./template") @route("/") def welcome_service(): print("config.DATA_PERSISTENCE_FLAG="...
false
true
f739eb5a8ca0992a17a6dbd1a4ee0628e0cbae25
716
py
Python
src/file_parser.py
gldgrnt/twitter-search-scraper
b0f2834f4fcb6406d63099a83352d60f4c39a99c
[ "MIT" ]
null
null
null
src/file_parser.py
gldgrnt/twitter-search-scraper
b0f2834f4fcb6406d63099a83352d60f4c39a99c
[ "MIT" ]
null
null
null
src/file_parser.py
gldgrnt/twitter-search-scraper
b0f2834f4fcb6406d63099a83352d60f4c39a99c
[ "MIT" ]
null
null
null
import os import sys from csv import reader class FileParser: def __init__(self, file_path): # Load file filename, extension = os.path.splitext(file_path) # Check for correct file format if extension != '.txt': print('Invalid file type, must be .txt with one query per l...
26.518519
76
0.585196
import os import sys from csv import reader class FileParser: def __init__(self, file_path): filename, extension = os.path.splitext(file_path) if extension != '.txt': print('Invalid file type, must be .txt with one query per line') sys.exit() ...
true
true
f739ed18da1797cb33e0f0cc2c265bff5cefa2d9
551
py
Python
Python/Tests/TestData/DebuggerProject/PrevFrameEnumChildTestV3.py
techkey/PTVS
8355e67eedd8e915ca49bd38a2f36172696fd903
[ "Apache-2.0" ]
404
2019-05-07T02:21:57.000Z
2022-03-31T17:03:04.000Z
Python/Tests/TestData/DebuggerProject/PrevFrameEnumChildTestV3.py
techkey/PTVS
8355e67eedd8e915ca49bd38a2f36172696fd903
[ "Apache-2.0" ]
1,672
2019-05-06T21:09:38.000Z
2022-03-31T23:16:04.000Z
Python/Tests/TestData/DebuggerProject/PrevFrameEnumChildTestV3.py
techkey/PTVS
8355e67eedd8e915ca49bd38a2f36172696fd903
[ "Apache-2.0" ]
186
2019-05-13T03:17:37.000Z
2022-03-31T16:24:05.000Z
# coding: utf-8 def g(): pass def f(): d1 = {42: 100} d2 = {'abc': 'fob'} d3 = {1e1000: d1} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.oar = 100...
14.891892
33
0.421053
def g(): pass def f(): d1 = {42: 100} d2 = {'abc': 'fob'} d3 = {1e1000: d1} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.oar = 100 se...
true
true
f739f035b0052a37929022735ab9a7e92d518233
815
py
Python
coursedashboards/cache.py
uw-it-aca/course-dashboards
0f195f7233fc8e24e9ca0d2624ca288869e133ba
[ "Apache-2.0" ]
1
2018-04-05T19:00:27.000Z
2018-04-05T19:00:27.000Z
coursedashboards/cache.py
uw-it-aca/course-dashboards
0f195f7233fc8e24e9ca0d2624ca288869e133ba
[ "Apache-2.0" ]
188
2017-08-31T23:38:23.000Z
2022-03-29T18:06:00.000Z
coursedashboards/cache.py
uw-it-aca/course-dashboards
0f195f7233fc8e24e9ca0d2624ca288869e133ba
[ "Apache-2.0" ]
null
null
null
from memcached_clients import RestclientPymemcacheClient import re ONE_MINUTE = 60 ONE_HOUR = 60 * 60 class RestClientsCache(RestclientPymemcacheClient): """ A custom cache implementation for Course Dashboards """ def get_cache_expiration_time(self, service, url, status=200): if "sws" == service: ...
28.103448
75
0.580368
from memcached_clients import RestclientPymemcacheClient import re ONE_MINUTE = 60 ONE_HOUR = 60 * 60 class RestClientsCache(RestclientPymemcacheClient): def get_cache_expiration_time(self, service, url, status=200): if "sws" == service: if re.match(r"^/student/v\d/term/\d{4}", url): ...
true
true
f739f11f89e0b302d28be62f97a04949d2e82d11
4,771
py
Python
rpy2_utils/robjects.py
pdatlab/rpy2_utils
8d563592550272604cf6453c6d4dd121f3da49b6
[ "MIT" ]
null
null
null
rpy2_utils/robjects.py
pdatlab/rpy2_utils
8d563592550272604cf6453c6d4dd121f3da49b6
[ "MIT" ]
null
null
null
rpy2_utils/robjects.py
pdatlab/rpy2_utils
8d563592550272604cf6453c6d4dd121f3da49b6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ """ import rpy2 import pandas as pd class DataFrame(): def __init__(self,r_df): """ import rpy2_utils as ru dfh = ru.robjects.DataFrame(r_df) """ #TODO: Verify data type self.r = r_df def __contains__(self, name): ...
28.915152
90
0.543702
import rpy2 import pandas as pd class DataFrame(): def __init__(self,r_df): self.r = r_df def __contains__(self, name): return name in self.r.names def renameColumn(self,old_name,new_name): names = list(self.r.names) I = names.index(old_nam...
true
true
f739f28f09e442fb9948d6b739f00afa3a7fe6ca
315
py
Python
math_day1/toy.py
ease44/training_camp
9a7b60ceb36e8634d2861c7b662934bbcdbb2093
[ "MIT" ]
null
null
null
math_day1/toy.py
ease44/training_camp
9a7b60ceb36e8634d2861c7b662934bbcdbb2093
[ "MIT" ]
null
null
null
math_day1/toy.py
ease44/training_camp
9a7b60ceb36e8634d2861c7b662934bbcdbb2093
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ 搭积木 小球相同,格子不同 """ def combination(n, m): r = 1 for i in range(1, m + 1): t = (r * (n - i + 1) // i) % (10 ** 9 + 7) t *= r return r if __name__ == '__main__': n, m = map(int, input().split(' ')) print(combination(m * m + n - 1, n) % (10 ** 9 + 7))
16.578947
56
0.44127
def combination(n, m): r = 1 for i in range(1, m + 1): t = (r * (n - i + 1) // i) % (10 ** 9 + 7) t *= r return r if __name__ == '__main__': n, m = map(int, input().split(' ')) print(combination(m * m + n - 1, n) % (10 ** 9 + 7))
true
true