blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b7e335ec5f9b7c481858b08725dd834ca4d73b3b | 917d4f67f6033a0cc01ba2b3b7b07dab94dcffdf | /property/pages/views.py | 6104059f52839acc79ba33851e228e4120171433 | [] | no_license | hghimanshu/Django | 011156c484e6710a379be3fb7faf6ab814bde02c | 75bef769e615df2719b213884f7269a56b7ccb7b | refs/heads/master | 2023-02-19T08:49:35.691196 | 2022-03-21T09:03:58 | 2022-03-21T09:03:58 | 242,301,089 | 0 | 0 | null | 2023-02-15T18:19:31 | 2020-02-22T07:43:13 | CSS | UTF-8 | Python | false | false | 856 | py | from django.shortcuts import render
from django.http import HttpResponse
from listings.models import Listing
from realtors.models import Realtor
from listings.choices import price_choices, bedroom_choices, state_choices
# Create your views here.
def index(request):
listings = Listing.objects.order_by('-list_date')... | [
"[email protected]"
] | |
51cd8ac2631b4848011d9365c3105f0a997c90de | ae9555e70027feb5502dc032852767fa77b9207b | /code/visualize.py | 72eafaf0c4849e61dfb47e5c911334cebcf70ff5 | [] | no_license | LuvYamashitaMizuki/sbert | b8d9495263cc0a9b58ae4ae7911f946499561bdf | 4da951ff27c503013d7dab2e6b57352488bed1ad | refs/heads/master | 2023-05-05T04:50:53.897329 | 2021-05-22T07:19:30 | 2021-05-22T07:19:30 | 369,705,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | words = []
data = []
for line in open("models/bert_embeddings11313.txt"):
embedding = line.split()
words.append(embedding[0])
embedding = list(map(float, embedding[1:]))
data.append(embedding)
f = open("bert_visualize.tsv", "w+")
for i in range(len(data)):
for i, pnt in enumerate(data[i]):
i... | [
"[email protected]"
] | |
8cb57215a38cae611c55923ca5e461bd7f9fed84 | 44b87d9faad99d542914c35410ba7d354d5ba9cd | /1/EXAM 2/start a following num end in b.py | 6fdd809b6c2423f47c4a8dc46bc3723b23095a91 | [] | no_license | append-knowledge/pythondjango | 586292d1c7d0ddace3630f0d77ca53f442667e54 | 0e5dab580e8cc48e9940fb93a71bcd36e8e6a84e | refs/heads/master | 2023-06-24T07:24:53.374998 | 2021-07-13T05:55:25 | 2021-07-13T05:55:25 | 385,247,677 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | import re
x='[a]\d+[b]'
input=input('enter ')
match=re.fullmatch(x,input)
if match is not None:
print('VALID')
else:
print('INVALID') | [
"[email protected]"
] | |
780073cc16c8f338f3195e45934b88dd0709ef5b | f777b5e4a98c40f4bfc5c5c9e326faa09beb2d53 | /projects/DensePose/densepose/modeling/cse/utils.py | 18480db5e485dec3bd0daf3cae69263a6abdde4f | [
"Apache-2.0"
] | permissive | alekseynp/detectron2 | 04ae9a47d950ea4c737715b5f2aa7637d3742264 | 2409af0bf0d4bdcc685feb6d2c7fd659828acac4 | refs/heads/master | 2022-05-30T09:13:26.438077 | 2022-04-11T20:59:40 | 2022-04-11T20:59:40 | 254,280,315 | 0 | 1 | Apache-2.0 | 2020-04-09T05:34:15 | 2020-04-09T05:34:14 | null | UTF-8 | Python | false | false | 3,538 | py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import torch
from torch.nn import functional as F
def squared_euclidean_distance_matrix(pts1: torch.Tensor, pts2: torch.Tensor) -> torch.Tensor:
"""
Get squared Euclidean Distance Matrix
Computes pairwise squared Euclidean distances b... | [
"[email protected]"
] | |
fce4178c6cb9494989c22ab01f8bd58fe80f1f06 | 3f2a1b1298883a147217fac62abf3e447f3328bd | /生成数据/scatter_squares.py | b3435ed3575348c54d41f4fc363df6554455bc17 | [] | no_license | wuxudongxd/python_code | c23a5e665d2f74b0b50839f3230b343b914d4a27 | 4a7bacc8061797c1344d9216813cdc02985fb0a3 | refs/heads/master | 2022-04-09T02:42:30.702003 | 2019-06-27T14:43:35 | 2019-06-27T14:43:35 | 234,686,253 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 595 | py | import matplotlib.pyplot as plt
x_values = list(range(1, 1001))
y_values = [x ** 2 for x in x_values]
plt.scatter(x_values, y_values, c = y_values, cmap = plt.cm.Blues, edgecolor = 'none', s = 40)
#设置图表标题,并给坐标轴加上标签
plt.title("Square Numbers", fontsize = 24)
plt.xlabel("Value", fontsize = 14)
plt.ylabel("Square of V... | [
"[email protected]"
] | |
35d65c1e31e62c13f7fa5ec8809270c77652898d | bbfd23efb084d9c13add9a36744cad94224762d2 | /octoprint_raisecloud/raisecloud.py | 39b54af88113f6dd8252d1b8bc41cc8f11e0320c | [] | no_license | Raise3D/Octoprint-Raisecloud | a68842dd8839a12640ac86ae8cfd529fcb2b8742 | 35975de651e15ac8fdb4a2eecea1f7ab8e25038d | refs/heads/master | 2023-08-31T09:41:39.477679 | 2023-08-17T07:52:43 | 2023-08-17T07:52:43 | 255,273,781 | 7 | 7 | null | 2023-08-17T07:52:44 | 2020-04-13T08:40:52 | Python | UTF-8 | Python | false | false | 3,237 | py | # coding=utf-8
from __future__ import absolute_import, unicode_literals
import json
import base64
import logging
import requests
from Crypto.Cipher import AES
_logger = logging.getLogger('octoprint.plugins.raisecloud')
class RaiseCloud(object):
def __init__(self, machine_id, printer_name, machine_type):
... | [
"[email protected]"
] | |
db5ec5010620f9dd0771c6bf99d56cad7dbaf3df | f39d030a25f63f5e60098b7069bfe129d7ffaa4e | /mapwidget/urls.py | 820a130c81cb55f15e47e30f360d29486c1ace39 | [] | no_license | RHoK-November-2012/zelenamapa | d248c4104b7ed497ca29aee1759567db7370f009 | 93080a67107dedeca1c9bc28177cdce4b2e7bc17 | refs/heads/master | 2021-01-15T22:09:16.899268 | 2012-12-10T12:57:26 | 2012-12-10T12:57:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | from django.conf.urls.defaults import patterns, include, url
from django.views.generic.simple import direct_to_template
from django.views.generic.simple import redirect_to
from views import *
urlpatterns = patterns("",
url(r"^(?P<w>\d+)x(?P<h>\d+)/(?P<pk>\d+)/$",
map_view,
name="zm.mapwidget.map"... | [
"[email protected]"
] | |
8cd9345ff2229d47ac210b638d0b05a9febb0fd4 | ec0678f8077702d9a8a1b4abd3e6a41de5ffab39 | /projects/migrations/0002_auto_20210513_0047.py | 135a127972b150d6369ccb74906fb7eabfc1a5c8 | [
"CC0-1.0"
] | permissive | pmburu/brenda-maxi | 17955b50eca09a4362853e0a20f8bbe82bdfa2e7 | 756a813e6d8207ea5fbf6a57097094601d565e8e | refs/heads/main | 2023-05-06T16:04:12.738807 | 2021-05-31T01:44:28 | 2021-05-31T01:44:28 | 366,536,520 | 0 | 0 | CC0-1.0 | 2021-05-15T14:59:58 | 2021-05-11T23:21:20 | null | UTF-8 | Python | false | false | 732 | py | # Generated by Django 3.2.2 on 2021-05-13 00:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='project',
options={'verbose_name': ... | [
"[email protected]"
] | |
af73d519f490016f2e04c80e9be69b7f30392f9c | 329d80ba2b792864aef583fa9ba0f8579ed96f46 | /src/timeslice/viz.py | 726ce7cae1fbce19cf716bf10cd873b63aeecab0 | [
"MIT"
] | permissive | spencerzhang91/GSPNet | fce229b11b23597375abbbe5a8e8bffaa4310551 | ff165de95ec0f258ba444ff343d18d812a066b8f | refs/heads/master | 2022-01-14T15:47:29.409475 | 2019-06-17T03:01:24 | 2019-06-17T03:01:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,078 | py | '''
Copyright <2019> <COPYRIGHT Pingcheng Zhang>
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, ... | [
"[email protected]"
] | |
b51668fb9bbb19d721415138985f985fa747b4e1 | 48db7db6e065af9bfdd9226176a1147dd39b8deb | /dataportalapi.py | 117219b7e92f791e9f7e36477238329fe2dc7c49 | [] | no_license | Najah-lshanableh/data-portal-treemap | 90131f3d8ca19b916fdb1e7a8729eba2869824ad | 35b8bee2eb5384d980724a78d5e97a6c8c771b6e | refs/heads/master | 2020-12-25T22:29:40.693147 | 2013-06-24T19:10:38 | 2013-06-24T19:10:38 | 38,136,477 | 0 | 1 | null | 2015-06-26T22:12:16 | 2015-06-26T22:12:16 | null | UTF-8 | Python | false | false | 2,209 | py | #Connects to the Socrata search API and loads data describing the tabular datasets in the catalog for use by D3 tree map
#Use: python dataportalapi.py > portaldata.json
import requests, json, math, re
def check_categories(d,category):
for i in range(len(d)):
if d[i]['name'] == category: return i
return -1
#f... | [
"[email protected]"
] | |
c1854c18c3be9690a31572a2e09f19b60d45d596 | c5174b07aa1f2eefc9d1aa156973a947c7906591 | /Utilities/custon_logging.py | 78939a565ff30237090a2d3b3b35c5bddab56235 | [] | no_license | rajabhinav02/selenium-python-framework | 5e3a749fda815bbb9eea2a7479e7f80f301bd77c | 69e464fdfcb054b2688291522e28f35b85c0b2e7 | refs/heads/master | 2023-06-07T10:49:55.314883 | 2021-07-13T15:37:33 | 2021-07-13T15:37:33 | 385,606,012 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | import inspect
import logging
def loggingtest(loglevel):
tcname = inspect.stack()[1][3]
logger= logging.getLogger(tcname)
logger.setLevel(logging.DEBUG)
#filehandler = logging.FileHandler("{0}.log".format(tcname))
filehandler= logging.FileHandler("auto.log", mode="a")
filehandler.setLevel(log... | [
"[email protected]"
] | |
de41515bdfe3faa82c3ce8ed5c220f24b123aac9 | 3712a929d1124f514ea7af1ac0d4a1de03bb6773 | /开班笔记/pythonMongoDB部分/day39/code/mongo1.py | 5b9aef2d4d0dc19f114aaca150810694bc086161 | [] | no_license | jiyabing/learning | abd82aa3fd37310b4a98b11ea802c5b0e37b7ad9 | 6059006b0f86aee9a74cfc116d2284eb44173f41 | refs/heads/master | 2020-04-02T20:47:33.025331 | 2018-10-26T05:46:10 | 2018-10-26T05:46:10 | 154,779,387 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | #coding:utf8
#索引和聚合操作
from pymongo import MongoClient,IndexModel
conn = MongoClient('localhost',27017)
db = conn.stu
my_set = db.class4
#创建索引,并且将索引名返回
#index = my_set.ensure_index('name')
#print(index)
#复合索引
#index = my_set.ensure_index([('name',1),('king',-1)])
#print(index)
#唯一索引和稀疏索引
cls = db.class0
#唯一索引
#ind... | [
"[email protected]"
] | |
b605974ab6d3d89ba69d3248a135c89cc71111ec | 5ca02343c366662b60966e060e50e9d6960c0531 | /TX/TX/settings.py | 45f686302330fb2cfde0ecc003da2686115a362c | [] | no_license | yyzhu0817/scrapy | eff5cc68ab25c89fe01c62e2c94e5511dad3fc34 | 9186b127bf49450850028c76142262c6f2c935da | refs/heads/master | 2020-12-10T01:00:34.924969 | 2020-01-20T02:54:58 | 2020-01-20T02:54:58 | 233,465,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,174 | py | # -*- coding: utf-8 -*-
# Scrapy settings for TX project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/topics/d... | [
"[email protected]"
] | |
f3b6f4f9df6a54c847740fed5d78cd37e29a0824 | a66a0152c7b37e7aa74ab7fff38704fb45fe3b9c | /img_util/img_test.py | 2673a916c9d93711fe949f572cba75bec8433b21 | [] | no_license | guoyy2017/python_util | 9c7a1351a0fd20fe187ac39972832abffbce3bad | ec90baacd7ca79420a598b701ae960d9337772b8 | refs/heads/master | 2021-06-25T23:47:10.056534 | 2020-10-09T01:01:45 | 2020-10-09T01:01:45 | 129,709,653 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,127 | py | #!/usr/bin/env python
# encoding: utf-8
'''
@author:maidou
@contact:QQ4113291000
@time:18/4/23.下午4:46
'''
from gevent import monkey
monkey.patch_socket()
from gevent.pool import Group
import gevent
import requests
import time
import functools
import traceback
def no_error(func):
@functools.wraps(func)
def wa... | [
"[email protected]"
] | |
09c5679119c5cc73c586ae0c22dbdc3ea5c11ac5 | 5f490d281ea385a692e7090a28867c47a82ccf61 | /models/base_model.py | f417254e0661a01749b032984b5da28bd79330df | [] | no_license | agoe/FlaskLogicBankSFRS_Demo | 7db0a93255ec8c4961ddcd32f030a7e369f0a8c1 | 62857caee4ba22a870f22b5f00da6f8ce1b742bd | refs/heads/master | 2023-02-12T04:56:00.325377 | 2021-01-06T15:46:37 | 2021-01-06T15:46:37 | 327,120,220 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 573 | py | import safrs
from safrs import SAFRSBase
db = safrs.DB
SAFRSBase.db_commit = False
class BaseModel(SAFRSBase):
def __new__(cls, *args, **kwargs):
return object.__new__(cls)
#__abstract__ = True
# Enables us to handle db session ourselves
# Override SAFRS __str__ with custom repr
'''
... | [
"[email protected]"
] | |
d7cab272034def647cc8d74d213a5bd61f80a1cd | 3f5a1ef51620fd8c35ef38064ca5aa00776ab6f4 | /full_speed_educative/dictionary/defination.py | e920f8dbd52c14cb5029ac0ed167f195ae926aff | [] | no_license | poojagmahajan/python_exercises | 1b290a5c0689f703538caf89bca5bc6c1fdb392a | 65539cf31c5b2ad5768d652ed5fe95054ce5f63f | refs/heads/master | 2022-11-12T03:52:13.533781 | 2020-07-04T20:50:29 | 2020-07-04T20:54:46 | 263,151,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,814 | py |
### Dictionaries are data structures that index values by a given key (key-value pairs).
ages = {
"purvansh" : 3,
"Pooja" : 28,
"Gaurav" : 30,
"swarit" : 1 ,
"meet" : 10,
"ishan" : 6
}
print("print age of any one -")
print (ages ["purvansh"])
print(ages["Gaurav"])
print("\n p... | [
"[email protected]"
] | |
fcabbaa316e2739642e5b6863421db370606196e | 172e4cd05ec0bdf676444f24043791a931b660ce | /polls/tests.py | e52bbc00987c0a2aca7ebe80820d760ebef8ceed | [] | no_license | si-tm/tes_jdango | 61137109f394d68591df872ee14721a54392a4f1 | 88d65337f6959c0b46178dad3d7ec4e9f826737e | refs/heads/main | 2023-01-05T05:42:20.464471 | 2020-10-31T07:48:10 | 2020-10-31T07:48:10 | 308,815,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,635 | py | import datetime
from django.test import TestCase
from django.utils import timezone
from .models import Question
from django.urls import reverse
"""
モデルやビューごとに TestClass を分割する
テストしたい条件の集まりのそれぞれに対して、異なるテストメソッドを作る
テストメソッドの名前は、その機能を説明するようなものにする
"""
class QuestionModelTests(TestCase):
def test_was_published_recentl... | [
"[email protected]"
] | |
caa0850988b9faedb6726b682fb5a8154116b383 | ddd4edc45481e6a7c7141b93e47b974634506d2d | /tradgram/relations/admin.py | 4dbfea14ffdda1239afd8dbc98f9c3eba2c6aaf4 | [
"MIT"
] | permissive | didils/tradgram | 407de9d05d01bc840c5c165155d370f092d82f0d | 4868ca082ab78a1b5b96f25ee9f958567bd1bb1e | refs/heads/master | 2021-11-19T02:47:02.224088 | 2019-04-05T08:19:14 | 2019-04-05T08:19:14 | 148,162,588 | 0 | 0 | MIT | 2021-09-08T00:57:43 | 2018-09-10T13:49:57 | Python | UTF-8 | Python | false | false | 439 | py | from django.contrib import admin
from . import models
# Register your models here.
@admin.register(models.Relation)
class RelationAdmin(admin.ModelAdmin):
search_fields =(
'product1',
'product2',
)
list_filter = (
'product1',
'product2',
'count',
'crea... | [
"[email protected]"
] | |
001fb2cc5db5996dfd5928fc977b7574860dffc1 | b349869bcd55098ee58bfe9f0bb2eb66e6f4dc71 | /MyLearning/ChatBot/google_docs_api.py | cbd4113695e5a9cfe384ed5c96182acf33f4e8e8 | [] | no_license | niteshsrivastava21/MyLearning | ec5206552c461f69d95750f2c1849ceeb56ff896 | 4d0561f360b0dd1b38554c6924cc9eaa9e1167b6 | refs/heads/master | 2020-06-21T10:58:15.590671 | 2020-04-23T12:16:17 | 2020-04-23T12:16:17 | 197,429,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,188 | py | from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import gspread
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://spreadshe... | [
"[email protected]"
] | |
9e8e5607a62fa19a162b1026aab6e20e14275de9 | 1a2bf34d7fc1d227ceebf05edf00287de74259c5 | /Django/Test/LuZhenNan/APP/views.py | 7e131b7ef59abef0102ca853aada9b3ad236a88c | [] | no_license | lzn9423362/Django- | de69fee75160236e397b3bbc165281eadbe898f0 | 8c1656d20dcc4dfc29fb942b2db54ec07077e3ae | refs/heads/master | 2020-03-29T18:03:47.323734 | 2018-11-28T12:07:12 | 2018-11-28T12:07:12 | 150,192,771 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,187 | py | import hashlib
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render, redirect
from django.urls import reverse
from .models import *
# Create your views here.
def index(request):
username = request.session.get('username')
users = User.objects.filter(username=username)
us... | [
"[email protected]"
] | |
27caf49568beef7598fd633ed60baf0c983961c5 | 8ed3b7d6f2afcba0162481235c67a51c6a0b0d83 | /apps/stocks/models.py | aec1f7e449a3c1a602dd7b0a1041ae6249895ac6 | [] | no_license | jeszytanada/management_inventory_pjt | 200c12d06f25e19a78c926e81d6ae05fcaa874d3 | c2bf33cf5ea1e3194a4c5705c69296204a11ebd2 | refs/heads/master | 2021-01-12T16:37:23.976797 | 2016-10-26T05:40:03 | 2016-10-26T05:40:03 | 71,419,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,911 | py | from django.db import models
from django.utils import timezone
from products.models import Product
class StocksAdjustment(models.Model):
BOOL_CHOICES = ((True, 'adding'), (False, 'removing'))
SA = 'Stock Adjustment'
PO = 'Purchase Order'
SO = 'Sales Order'
NO = 'None'
REFERENCE_CHOICES = (
... | [
"[email protected]"
] | |
cbf46f36fb4141439838b27db0ec705a606c5468 | e905814918e46b2132d1e0b98c11fb53299b2138 | /gather_seq_comps.py | b179b6e0ce64eb034fb84c50e3e1a584a11e3e80 | [] | no_license | HanLabUNLV/HIDL | 0c013a1872be1e3a13960ce0bc2c4fbdf3f0baf9 | a27e01972b734dd1ae4d8c8a6054827139281050 | refs/heads/master | 2021-06-18T02:59:49.330038 | 2021-03-31T23:45:02 | 2021-03-31T23:45:02 | 190,291,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,266 | py | from os import listdir as ls
def readFasta(fn):
fasta = {}
for line in fn:
if line[0]=='>':
fasta[line[1:-1]] = ''
key = line[1:-1]
else:
fasta[key] += line.strip()
return fasta
aas = ['A','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','... | [
"[email protected]"
] | |
1bcde3653da01f434076651467117b7d65577dc5 | 5f4707160434d4c01e1839ca9054604643f93e77 | /tests/test.py | acf8637b4d3a6862f059c65b44e2b2a70a24d548 | [
"MIT"
] | permissive | blockspacer/pimpl-cpp-generator | 7e04dc62b2c85b6dfe1b9ea40974453ad3152e1b | e6afe37b6034e613b706b60a80e8daf93f33c1d3 | refs/heads/master | 2021-05-29T20:09:47.297778 | 2015-11-12T08:42:43 | 2015-11-12T08:42:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,319 | py | # Copyright (c) 2015 Noto, Yuta
# Released under the MIT license
# http://opensource.org/licenses/mit-license.php
import sys
import os
import pprint
sys.path.append(os.path.dirname(__file__) + '/..')
import pimplgen
from nose.tools import ok_, eq_
BASE_DIR = os.path.dirname(__file__)
def setup_module(module):
#... | [
"[email protected]"
] | |
66998385cfd63d8da3209d0c2b35fbf502de5205 | 309b4412972a36ec3a36ee3489f5ecca66894c5e | /quad96/training/actor_critic.py | bb798d5aa0320b73432876907158c04f4f664e60 | [
"BSD-3-Clause"
] | permissive | Genix-Gu/quad96 | 84c11b70c2dd43145c849bafa0bcd661243c3869 | f30929342da4c44b1c05ce03a5b484be2eac7925 | refs/heads/main | 2023-02-02T21:36:28.182229 | 2020-12-23T13:05:25 | 2020-12-23T13:05:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,747 | py | import numpy as np
import tensorflow as tf
from keras import backend as K
from keras import layers, models, optimizers, regularizers
__author__ = "Ussama Zahid"
__email__ = "[email protected]"
# this file contains the model definations i.e. Actor and Critic and the special actor loss function
# which use the f... | [
"[email protected]"
] | |
c9e49c4e0852af965d1c1a324079541d2dbfbac0 | bf593db51f9a3ef9a4cd8235466e4dd138ee61f2 | /IT 310 - Data Structures and Algorithms/inclass 11_22.py | 1fe740c2e86c0ce9ebd384074173365ffd0ddf94 | [] | no_license | TylerBade/Classwork | 101e35d006cdf5d52079270c0f745a87a3142774 | 43ecc9b46d2d7fe604eac33ca064e9bc1c23302c | refs/heads/master | 2020-03-22T04:55:15.210658 | 2018-10-22T06:53:05 | 2018-10-22T06:53:05 | 137,776,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,693 | py | import sys
from functools import total_ordering
import heapq
class Vertex:
def __init__(self, node):
self.id = node
self.adjacent = {}
# Set distance to infinity for all nodes
self.distance = sys.maxsize
# Mark all nodes unvisited
self.visited = False
... | [
"[email protected]"
] | |
806e3cd0e19b3608d616b002a8bb2b876ca9e51a | d564c1dcde3a139960e441a732f308dee7bac268 | /code/run5All_Content_PlainUD.py | 517e77577c22a0ae492044444a377776233b03a6 | [] | no_license | m-hahn/left-right-asymmetries | 9b5142dcf822194068feea2ccc0e8cc3b0573bbe | 45e5b40a145e2a9d51c12617dc76be5a49ddf43e | refs/heads/master | 2020-04-26T11:47:57.781431 | 2019-03-22T01:00:48 | 2019-03-22T01:00:48 | 173,528,908 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | from ud_languages import languages
import subprocess
languages = sorted(languages, reverse=True)
for language in languages:
for model in ["REAL_REAL", "REVERSE"]: #, "GROUND"] + (["RANDOM_BY_TYPE"] * 5):
command = ["./python27", "testLeftRightEntUniHDCond3FilterMIWord5_Content_PlainUD_Bugfix.py", language, mod... | [
"[email protected]"
] | |
0d5fb3722a72d746607b18d92434d47ef39879d8 | c6f15aa103de030f7eea6c1aaf6e7ad0ec88dbc1 | /add/AppMcsv/storage/volume/Volume.py | b21fe01e6712fe2709429c0d0eb031b3f2a0eedd | [] | no_license | sysdeep/dcat | 6f3478348113b0d1206f82456f5bd80431282daf | f8c801173ace4447018c3034c56254ab1a6d4089 | refs/heads/master | 2023-05-03T16:04:28.027335 | 2023-04-17T15:04:04 | 2023-04-17T15:04:04 | 320,551,696 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,453 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import gzip
from enum import Enum
import time
DET = "-"*10
class Sections(Enum):
header = 0
body = 1
class Record(object):
def __init__(self):
self.name = ""
self.uuid = ""
self.parent = ""
self.childrens = []
def append(self, ch):
self.childrens.app... | [
"[email protected]"
] | |
225ee20b98820cbb8db5fb60d084738de16a3dfd | b0c407f17764bceac693bd84e025f1a1c9231925 | /scrap/tmomanga_com.py | 26b65e1a4cf7d627bd67f0cc58c7991f8543da9d | [] | no_license | fotosycaptura/smg | aa5bbba0f4bdbc0ce077d4f5a2eaa303f26e6adf | af4e9d12c585c274c70e77b75ca059d2c7e02bc5 | refs/heads/master | 2023-08-08T15:30:38.461043 | 2023-06-23T19:22:37 | 2023-06-23T19:22:37 | 227,163,364 | 0 | 0 | null | 2022-03-18T19:27:10 | 2019-12-10T16:12:44 | Python | UTF-8 | Python | false | false | 5,252 | py | import bs4
import requests
import os
from varios import utilerias
import numpy as np
class tmomanga_com:
def __init__(self, version, home_mangas, opciones, listado_mangas):
self.home_mangas = home_mangas
self.opciones = opciones
self.listado_mangas = listad... | [
"[email protected]"
] | |
2e879594bf48e697d44aa763f51722ea69384e48 | 2e4673cea11375e9e772abd71f71e6a8d9ec69eb | /decompress.py | 770a99aea56f81b2a0d848d06d98222e436578f0 | [] | no_license | lygztq/RLE-compressor | e8ef4ef6dd7a71fd20cf0c35351f8711accedc48 | fa23aef05331dad7204f19c33450134fe20e5cbe | refs/heads/master | 2021-08-24T13:43:25.186957 | 2017-11-21T08:35:03 | 2017-11-21T08:35:03 | 111,517,524 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,006 | py | #coding=utf-8
from tools import *
import cv2
import numpy as np
import argparse
def main():
compressed = ''
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument("--compressed",help="The path of compressed file")
arg_parser.add_argument("--window",help="size of compress window")
#arg_parser.add_argument... | [
"[email protected]"
] | |
bd0b390b25581621d8345e96bce69c41a2766451 | 8d4472817c83e2279794ed7a6856276e298a0d12 | /karmin/users/apps.py | 7a604544ca3274f9a47d58bb17ad671998520141 | [] | no_license | smirnoffs/karmin | cf2fa257e7a2f09b2b675d30347e557ae87445c8 | 4c1744a38468189f383ac26d9da870f8318a2789 | refs/heads/master | 2021-01-16T00:28:46.414881 | 2017-08-11T20:27:17 | 2017-08-11T20:27:17 | 99,963,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | from django.apps import AppConfig
class UsersConfig(AppConfig):
name = 'karmin.users'
verbose_name = "Users"
def ready(self):
"""Override this to put in:
Users system checks
Users signal registration
"""
pass
| [
"[email protected]"
] | |
12f14216b2b4a57ff01c2b1c049c8688d0d4cbf8 | 34ed92a9593746ccbcb1a02630be1370e8524f98 | /lib/pints/pints/plot.py | e915a7b2d7e282f5c1642e4f76e9500005a923c2 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | HOLL95/Cytochrome_SV | 87b7a680ed59681230f79e1de617621680ea0fa0 | d02b3469f3ee5a4c85d756053bc87651093abea1 | refs/heads/master | 2022-08-01T05:58:16.161510 | 2021-02-01T16:09:31 | 2021-02-01T16:09:31 | 249,424,867 | 0 | 0 | null | 2022-06-22T04:09:11 | 2020-03-23T12:29:29 | Jupyter Notebook | UTF-8 | Python | false | false | 28,013 | py | #
# Quick diagnostic plots.
#
# This file is part of PINTS.
# Copyright (c) 2017-2018, University of Oxford.
# For licensing information, see the LICENSE file distributed with the PINTS
# software package.
#
from __future__ import absolute_import, division
from __future__ import print_function, unicode_literals
de... | [
"[email protected]"
] | |
9101f98269a25bbd0d6a6a65bc58c9e4c128d376 | 443927accc10828ea1e81c46c38f4f7b0815390c | /armstrong.py | d3a9905eed995beb6394b333b62043b5a5161e61 | [] | no_license | 1PrathameshMore/PPL-assignments | 690042bceba55731c01e99903dd8cb3fc7e50f97 | 7633a001b9bebc7ab2057fa9ab72a9c1fdbaeda3 | refs/heads/master | 2022-10-14T22:00:25.658406 | 2020-06-10T16:55:49 | 2020-06-10T16:55:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | def armstrong():
d = input()
e = input()
d = int(d)
e = int(e)
if d < e:
for i in range(d,e):
z = noofplaces(i)
c = i
sum = 0
while c > 0 :
r = c % 10
f = pow(r,z)
sum = sum + f
... | [
"[email protected]"
] | |
95612c8e2207355469ab70ff6f985fb9fef74ba0 | d6ca0b326f1bd0ce381c6db611f6331096bf4187 | /pypet/tests/_atworema.py | 5862c910f1aa08c6ff96162a56510430111ec8f6 | [
"BSD-3-Clause"
] | permissive | SmokinCaterpillar/pypet | aa35355d70e8f44be015313494376d993f645d80 | 3d454ac65f89e7833baaf89510f73c546e90d8f6 | refs/heads/develop | 2023-08-08T16:01:54.087819 | 2023-02-14T14:59:32 | 2023-02-14T14:59:32 | 12,901,526 | 89 | 22 | BSD-3-Clause | 2023-07-24T00:46:12 | 2013-09-17T17:06:00 | Python | UTF-8 | Python | false | false | 352 | py | __author__ = 'Robert Meyer'
from pypet.tests.testutils.ioutils import run_suite, discover_tests, TEST_IMPORT_ERROR
if __name__ == '__main__':
suite = discover_tests(predicate= lambda class_name, test_name, tags:
class_name != TEST_IMPORT_ERROR)
run_suite(remove=... | [
"[email protected]"
] | |
72ff753a9ba4196f39464a93290728c75816d6aa | 5623771414b26c021be54facaaaefbd9314b389d | /week7/DS/DP/Min_sum_path.py | ae37aa64e4f0f1e20de2069fd94641db8a4796da | [] | no_license | saxenasamarth/BootCamp_PythonLearning | 36b705b83c7f0e297931bb8d75cb541088690248 | d5b8fe2d6fcfe54c5a7393f218414b1122f3e49e | refs/heads/master | 2023-04-17T15:29:05.402863 | 2019-08-29T08:46:34 | 2019-08-29T08:46:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 664 | py | # Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
def find_min_sum_path(matrix):
out = [[0 for i in range(len(matrix[0]))] for j in range(len(matrix))]
out[0][0] = matrix[0][0]
for i in range(1, len(matrix)):
... | [
"[email protected]"
] | |
3d130e94b284e910f8bf1d35df948b77df1983ef | e9ce73e5c3301705b63df42524ee12cff1e32fa9 | /libs/layers/nms/nms_layer.py | a95c95c835bb92ed21877e285ae5f153e5c28fba | [
"Apache-2.0"
] | permissive | tanghanlin/Detectron-PYTORCH | 374e800f888f3b485c7475efb10daa698ed7a23e | 468a8050330db4de1e22509c8b741ad236a55d88 | refs/heads/master | 2023-03-16T06:54:12.937167 | 2018-08-23T03:06:26 | 2018-08-23T03:06:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,617 | py | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import torch
from torch.autograd import Function
import torch.nn as nn
from ._ext import nms
class NMSFunction(Function):
def __init__(self, overlap_threshold):
super(NMSFunc... | [
"[email protected]"
] | |
bfe97c1c044bc1c39b5f9594fdec9c287f465d1d | 407d52d5d9cfb8f04861a92bc97724bf2e07857d | /utils/views.py | 352d299563eb6e04d754988a7d942141e8516f1e | [] | no_license | buddy-israel/win_crawler | 43b6e60d5008d6138f8fea07f56633acced29ff4 | e2daf56e6c7be803146623a2c56f2e46cfc63909 | refs/heads/main | 2023-05-09T03:30:05.238468 | 2021-06-01T17:52:46 | 2021-06-01T17:52:46 | 372,916,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | import sqlite3
from sqlite3 import Error
database = "../spider.db"
def create_connection():
conn = None
try:
conn = sqlite3.connect(database)
except Error as e:
print(e)
return conn
def create_views():
conn = create_connection()
view_1 = """SELECT DISTINCT UserName, PostCount FROM User O... | [
"[email protected]"
] | |
c692cadb2a52ac7d2cf357c396e4317491d8d0fd | c356b0f0d380b3dee5bf38334e6f162875ea23d9 | /05_scrapy/facebook/facebook/items.py | d9ec76da64665a791194c0c6bc4336f5be1baf87 | [
"MIT"
] | permissive | AlexaVane/Velasco-Yepez-Andres-David-Python | d29bd7f22a1dc69e3e106fd75811aecd129fe23a | 0c017d6e5f169f31207ddec5ceffc8dd82d327eb | refs/heads/master | 2020-08-23T15:16:54.268707 | 2019-02-09T08:52:23 | 2019-02-09T08:52:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 383 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class ComentarioItem(scrapy.Item):
username = scrapy.Field()
content = scrapy.Field()
class FacebookItem(scrapy.Item):
# define the fields... | [
"[email protected]"
] | |
a4cce41e3df9414b4d0faa27cb4e7dc024befcb8 | 4c5328381f53d8b77b56a597cc39a32b55a0c4c2 | /Cura/gui/view3D/printableObjectRenderer.py | 88a57fe5161dce1651e1ffc756679a55a1b9d57a | [] | no_license | sanyaade-iot/Cura2 | 47fc18a8886dcc8537439b699cdb201d92e68683 | b8655a20ca4a03acaa2ada555f57fe415264d944 | refs/heads/master | 2021-01-16T20:06:18.885340 | 2014-06-06T12:51:10 | 2014-06-06T12:51:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,207 | py | __author__ = 'Jaime van Kessel'
from OpenGL.GL import *
from Cura.gui import openGLUtils
from Cura.resources import getMesh
from Cura.gui.view3D.renderer import Renderer
class PrintableObjectRenderer(Renderer):
def __init__(self):
super(PrintableObjectRenderer,self).__init__()
self._shader = ope... | [
"[email protected]"
] | |
587d3ccd32a63d4533cfe8bd0631d0c543135cd9 | bbb88937e81b29596ddc42b525bbb05fb2e55a48 | /adjutant/tasks/__init__.py | 73863576ecc3c406aa7f95ca0fb66f8c8b5c7450 | [
"Apache-2.0"
] | permissive | openstack/adjutant | f665ee6d903b560684b23462abd4c4c135863767 | df8c3e4a8b70be8697ac46f0acec9169752b4698 | refs/heads/master | 2023-09-03T11:43:39.117103 | 2022-12-07T03:27:10 | 2023-01-04T07:24:00 | 94,869,844 | 23 | 12 | Apache-2.0 | 2021-01-16T06:09:30 | 2017-06-20T08:49:01 | Python | UTF-8 | Python | false | false | 630 | py | # Copyright (C) 2019 Catalyst IT 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 o... | [
"[email protected]"
] | |
2e6fadca5613e103fb85f5c3b055556a12ea5d25 | 840f44f053283d19357b611d30e3c0077c9c06ab | /Back-End Projects/Python/django/Getting Started/Survey/Survey/urls.py | 290d51c4778fd62ac5910f027e5e4b576167346c | [] | no_license | Siahnide/All_Projects | a790700eb4ae66a9eb16098d09249666a403df21 | 91aa259fba145af2f972fdb5285d3ee1e7a02d7b | refs/heads/master | 2020-03-26T09:49:30.932028 | 2018-08-14T20:01:49 | 2018-08-14T20:01:49 | 144,766,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 959 | py | """Survey URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | [
"[email protected]"
] | |
e591fa3628ca4a4f93b25edfbf537c50c7d91cc0 | ea17f5e7e3cfe51198bb014db152d22df827a998 | /variable_delay/third_party/mininet/node.py | 28c7db052841156d69f1f76e06cedcae849015ad | [
"LicenseRef-scancode-x11-stanford"
] | permissive | JerryLX/CoCo-beholder | e3bb15954c66e87fd209820cddea1adadc89af99 | 0c6698fcbf3134ae167e8f10a7b631b34957b726 | refs/heads/main | 2023-04-19T08:13:48.205838 | 2021-04-18T13:38:09 | 2021-04-18T13:38:09 | 357,019,424 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 61,673 | py | """
Node objects for Mininet.
Nodes provide a simple abstraction for interacting with hosts, switches
and controllers. Local nodes are simply one or more processes on the local
machine.
Node: superclass for all (primarily local) network nodes.
Host: a virtual host. By default, a host is simply a shell; commands
... | [
"[email protected]"
] | |
e94e7557d33b1909175c4988faa350e67ef00853 | 5024bd5585b193310405b8cbcf9f87bef68c8b32 | /processing/process_synthesized_images.py | 6117162e38f0ad66cb043a4c4c2c8e0a6c3749f5 | [] | no_license | san-soucie/NetDissect-Lite | 7374e8a03bca7102cd1cbc081dea019548079267 | 73c744f5eac68fc8a9db73576242ec8bdfb49fa4 | refs/heads/master | 2020-04-08T17:24:04.872861 | 2018-12-07T08:51:44 | 2018-12-07T08:51:44 | 159,565,020 | 0 | 0 | null | 2018-11-28T21:07:55 | 2018-11-28T21:07:54 | null | UTF-8 | Python | false | false | 8,385 | py | import torch
import torch.nn as nn
import torchvision
import os
import argparse
from matplotlib import pyplot as plt
class NetSoftmax(nn.Module):
def __init__(self, num_classes=1000, aux_logits=True, transform_input=False):
super(NetSoftmax, self).__init__()
self.net = torchvision.models.alexnet... | [
"[email protected]"
] | |
78e8717353029c7bc31c28856cf0bd047306f771 | d7e9c29b0ee5383e0b80c8c2da62d6f20991a616 | /core/logger.py | a6c1a022e0ba4b880a1bbb19efbefd8447876032 | [] | no_license | evescn/evescn_hosts_management_tools | f3e046868a6c7b497fd06872006465d47a5d4763 | c9f1e67284e73a729b219a7c6bdd9905ff7c15fb | refs/heads/main | 2023-01-24T20:56:19.860882 | 2020-11-18T06:11:47 | 2020-11-18T06:11:47 | 313,810,453 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 932 | py | # -*- coding: utf-8 -*-
# @Author : Evescn
# @time : 2020/11/18 10:06
# @File : logger.py
# @Software : PyCharm
import logging
from conf import setting
def logger(log_type):
logger = logging.getLogger(log_type)
logger.setLevel(setting.LOG_LEVEL)
ch = logging.StreamHandler()
ch.setLeve... | [
"[email protected]"
] | |
6b6280abd4bf186e5c161efa413338f2de21d3a0 | 8f75faeed726ff79b36769898f7c81adafaf8553 | /project/models.py | e799b0d9547d080fa7e994e944a85faea9c28ad6 | [
"MIT"
] | permissive | jeremywgleeson/Corec-AutoSchedule-Avail | b20cadc9e0851663b8b06b541603854068dc6cfb | 39084fa2abcad4739a7df6ecffd65803a6c3b33b | refs/heads/master | 2022-12-28T00:33:27.325617 | 2020-10-01T02:36:41 | 2020-10-01T02:36:41 | 296,524,234 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,719 | py | from .extensions import db
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
import pyotp
import base64
class User(UserMixin, db.Model):
# __tablename__ = 'flasklogin-users'
id = db.Column(
db.Integer,
primary_key=True
)
userna... | [
"[email protected]"
] | |
e792f1f203c2d7d9d4238ae0cab0a1923a889d5d | e3fb3fe973bb7801ff6799a8cc2db974bc47a599 | /truck/signals.py | 9dbf3a0b0de9d43d4afad5208d57c98a670bccd9 | [] | no_license | Meals-on-Wheels/food_truck_locator | 734e398218bbccfda8904ef3e7c6ae40ac2f64ec | c34461d609cc433cc2aada56ffb9d6c2fbac057c | refs/heads/main | 2023-03-15T22:49:02.615658 | 2021-03-04T18:19:46 | 2021-03-04T18:19:46 | 329,754,601 | 0 | 0 | null | 2021-03-04T18:19:47 | 2021-01-14T22:58:42 | JavaScript | UTF-8 | Python | false | false | 699 | py | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
class Account(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="profile")
signup_confirmation = models.BooleanField... | [
"[email protected]"
] | |
4f93eb5a8ca11eb43e6903d4e1ccd3e91447737d | d2fe0085b52506733b72229cd1b851bfbdbfeb1f | /mean_var_std.py | b736ca0969bbde30a669f565be16ad47e4505ec5 | [] | no_license | maheshdbabar9340/Mean-Variance-Standard_Deviation_Calculator | 1b62a3203e3d20c7252f18ec5d7d05a8debb9388 | cffbc2974ead977b53fc0e6d65669b36fe7eae47 | refs/heads/main | 2023-05-12T15:48:00.725344 | 2021-06-03T10:51:40 | 2021-06-03T10:51:40 | 373,472,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,073 | py | import numpy as np
def calculate(list):
if len(list) != 9:
raise ValueError("List must contain nine numbers.")
array = np.array(list).reshape((3, 3))
calculations = {
"mean": [
np.mean(array, axis = 0).tolist(),
np.mean(array, axis = 1).tolist(),
np.mean(array.tolist())
]... | [
"[email protected]"
] | |
6c5e9965271a443300889d89cd4030b10c29cfee | f290130f79bcccc3f8881707766f7833d297d9f8 | /configsetup.py | 82f5f2388ed10d127a2f44be831613a7c9e22326 | [
"MIT"
] | permissive | BunniwuvsPoni/Python-Reddit_Submission_Analysis | 906e54beccef7779d1b88ebffd3e8887f4dbcd51 | 12c41ff09954e14852363776d31100dae9d47c09 | refs/heads/master | 2023-03-09T12:39:55.949656 | 2021-02-13T23:56:13 | 2021-02-13T23:56:13 | 338,662,252 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | # .gitignore should include reference to config.py
# configsetup.py should be duplicated to config.py to take effect
client_id = "personal use script"
secret_token = "secret token"
username = "username"
password = "password"
botname = "botname"
subreddits = ["subreddit1","subreddit2"] | [
"[email protected]"
] | |
d3ed2e74b0e9dba9944dd11ca896b5016acd263d | 154fd16fe7828cb6925ca8f90e049b754ce06413 | /lino_book/projects/lydia/tests/dumps/18.12.0/teams_team.py | e3d2d31af2866296e853ea6765cf5e65fe6a2a6c | [
"BSD-2-Clause"
] | permissive | lino-framework/book | 68de2f8d130266bd9d9de7576d30597b3cde1c91 | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | refs/heads/master | 2021-03-27T16:16:55.403940 | 2021-03-15T02:53:50 | 2021-03-15T02:53:50 | 58,830,342 | 3 | 9 | BSD-2-Clause | 2021-03-09T13:11:27 | 2016-05-14T21:02:17 | Python | UTF-8 | Python | false | false | 254 | py | # -*- coding: UTF-8 -*-
logger.info("Loading 2 objects to table teams_team...")
# fields: id, ref, name
loader.save(create_teams_team(1,u'E',['Eupen', '', '']))
loader.save(create_teams_team(2,u'S',['St. Vith', '', '']))
loader.flush_deferred_objects()
| [
"[email protected]"
] | |
b174764fa0bbacb443dfd94c15d00bdf50133e72 | 50346c15b656d354b69d390b268bf1d93665d23a | /getliveconfig | e7fe696af3e872999005b38a010f6cab63fa7ab7 | [] | no_license | avongluck-r1soft/production | 9baf007724e2b9d7188b0b77b9ba37c557fe9a2d | ffa2af7e30d08f7a8c050dead5534c3620c1d066 | refs/heads/master | 2021-01-11T21:09:28.804283 | 2016-12-27T22:51:15 | 2016-12-27T22:51:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | #!/usr/bin/env python
import urllib2
import sys
def getLiveConfig(csbm):
url = "http://10.80.65.31:57988/r1rmGA/csbm/"+csbm+"/liveConfig"
print url
response = urllib2.urlopen(url)
content = response.read()
return content
def usage():
print " usage: " + sys.argv[0] + " <CSBM GUID>"
print ... | [
"[email protected]"
] | ||
f8bc2d9b846c19133bad97101540f24fbf6596a6 | 72918242418d81e3ef2b9030553d3d8cc14f28ad | /code/RF-cv.py | d27454dd58f6eae12da993f41380f140aa46e724 | [] | no_license | qq-shu/TextCNN | e03e179454d52fcf00de4c4678d92e277b33cd4d | cdf61e9f72b1c0e7a71cb00b4f91d96b416a0ac3 | refs/heads/main | 2023-08-16T12:59:08.563400 | 2021-09-30T03:30:52 | 2021-09-30T03:30:52 | 411,896,405 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,726 | py | from sklearn.ensemble import RandomForestClassifier as RF
# from sklearn import cross_validation
from sklearn import model_selection
from sklearn.metrics import confusion_matrix
import pandas as pd
subtrainLabel = pd.read_csv('subtrainLabels.csv')
subtrainfeature = pd.read_csv("3gramfeature.csv")
subtrain = pd... | [
"[email protected]"
] | |
b4158282f6e90ee810904eb5e6be6f5e5f95435d | 1fad121fea752aa3aee03f7665917ce9563e0d08 | /src/form/panel/VmdPanel.py | e75138d37ae45d096b8a52074f7f82a941f91b1f | [
"MIT"
] | permissive | JerryAJIAN/vmd_sizing | 0d382b9b94cdc3878e9d9a1c03f2c9c5f285ac6a | baad81eb40a21c9fa864344fbbf75cdab887c9c6 | refs/heads/master | 2022-11-18T03:57:57.111852 | 2020-07-06T15:10:27 | 2020-07-06T15:10:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,450 | py | # -*- coding: utf-8 -*-
#
import wx
import wx.lib.newevent
import sys
from form.panel.BasePanel import BasePanel
from form.parts.BaseFilePickerCtrl import BaseFilePickerCtrl
from form.parts.ConsoleCtrl import ConsoleCtrl
from form.worker.VmdWorkerThread import VmdWorkerThread
from module.MMath import MRect, MVector3D,... | [
"[email protected]"
] | |
597ed3021932f77385f3b2c410bdedc42f93e5e5 | 5658a581490c45ec45161174364e9aa1d143e7dc | /p1app/views.py | 905e2488d5254ee142ac54a1a5ce26bc42e8c235 | [] | no_license | subhamkumarmal/fontvideo | e40d4c72bfde5b8c22fbf8b3dec36c4a4abef5c5 | 185c3bb1f43a21f8def8d0ad5dff75949e838c23 | refs/heads/master | 2023-07-07T15:32:05.779397 | 2021-08-11T08:12:54 | 2021-08-11T08:12:54 | 394,914,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 131 | py | from django.shortcuts import render
# Create your views here.
def Index(request):
return render(request,'p1app/index.html')
| [
"[email protected]"
] | |
5cd20bb33eb53e0632fbff667e2f70753a58513d | 35849876e426848b6985043d4a1537f4284d90eb | /icode121/dev.py | 2448218d7cc830a4797c252a4613f7968ec244fe | [] | no_license | P79N6A/icode | e2d0a982f0bd8462a5035ff802615ba961f1df22 | d13a5fcd744080099cb514d77d703384cea25ff9 | refs/heads/master | 2020-04-26T23:05:53.998314 | 2019-03-05T06:56:36 | 2019-03-05T06:56:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,373 | py | from .settings import *
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = True
ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS += [
'app.artical',
'app.comment',
'app.course',
'app.user',
'app.other',
'app.activity',
'debug_toolbar',
... | [
"[email protected]"
] | |
099b882a7057d5cd24e0b98ae5aa752f70f5f128 | 30a8b69bd2e0a3f3c2c1c88fb3bd8a28e6fc4cd0 | /Part1/load_shapefile.py | 5f31c2a37d32ed6c638bb6a4a1c85920628b25c3 | [] | no_license | llord1/Mining-Georeferenced-Data | d49108f443922f02b90431ad7a9626ea17fd0554 | c71f2e151ccfc4a1a9c07b5fcf4e95b7f7ba70e9 | refs/heads/master | 2021-05-30T13:27:57.663015 | 2015-12-29T09:10:08 | 2015-12-29T09:10:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 542 | py | #!/usr/bin/env python
import sys
import shapefile
from shapely.geometry import shape
shp = shapefile.Reader(sys.argv[1])
print "Found", shp.numRecords, "records:"
pos = None
count = 0
for record in shp.records():
print " ", record[1]
if record[1] == sys.argv[2]:
pos = count
count += 1
if pos... | [
"[email protected]"
] | |
99a64502bc4d3c80b07c903df53770314112a9ed | df7f13ec34591fe1ce2d9aeebd5fd183e012711a | /hata/discord/user/thread_profile/tests/test__ThreadProfile__magic.py | 62df5d60ace156b75fde3936db52d10717f48aed | [
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | HuyaneMatsu/hata | 63e2f6a2d7a7539fd8f18498852d9d3fe5c41d2e | 53f24fdb38459dc5a4fd04f11bdbfee8295b76a4 | refs/heads/master | 2023-08-20T15:58:09.343044 | 2023-08-20T13:09:03 | 2023-08-20T13:09:03 | 163,677,173 | 3 | 3 | Apache-2.0 | 2019-12-18T03:46:12 | 2018-12-31T14:59:47 | Python | UTF-8 | Python | false | false | 1,575 | py | from datetime import datetime as DateTime
import vampytest
from ..flags import ThreadProfileFlag
from ..thread_profile import ThreadProfile
def test__ThreadProfile__repr():
"""
Tests whether ``ThreadProfile.__repr__`` works as intended.
"""
flags = ThreadProfileFlag(2)
joined_at = DateTime(2016,... | [
"[email protected]"
] | |
3c1e759a36ac17443a120a3600f59e2a5af68931 | fdc1b3845db0228519267786c25ef5dcd3b45618 | /sensor_tests/rn2483/ttn.py | a616b421419ff6b4999e6043b07d9f983f0d30a3 | [] | no_license | NaimaClaesson91/Examensarbete2019 | e3e3a57bbf6a039da2903a2be1d991ca285bf1be | f577aad7100572b97af689ca38231c5e608ff48a | refs/heads/master | 2020-09-18T18:28:24.836358 | 2019-12-17T15:01:09 | 2019-12-17T15:01:09 | 224,165,578 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,857 | py | class Ttn:
'''Module for connecting to The Things Network.'''
def __init__(self, modem):
self.modem = modem
def configure_frequency_plan(self):
'''Configure the EU863-870 frequency plan.'''
# Calculate the duty cycle value.
duty_cycle_pct = 1
channels = 8
... | [
"[email protected]"
] | |
f048eabd955bcc093164421606757595cab699a0 | ef15856f4e4cc789486ad2aa49225b48cd179c56 | /app/api/koko/crud.py | 1328187994286484879a2c3bceba626c474d9cf4 | [] | no_license | sbansa1/Koko | 7f6154c4f1ba47478a04585bd918ed51a57d781e | 2b24b2ac13c578c3fc983343e72f6dc91629737b | refs/heads/mast-1 | 2023-07-22T15:35:53.578284 | 2020-06-22T22:55:18 | 2020-06-22T22:55:18 | 273,943,071 | 0 | 0 | null | 2021-09-08T15:43:40 | 2020-06-21T16:30:21 | Python | UTF-8 | Python | false | false | 373 | py | from app.api.koko.model import Rental,Book,Customer
from app.extensions import db
def all_rental_by_customer(customer_id):
"""Gets all the books rented by the customer"""
all_books_query = Rental.query.join(Book,Rental.books)
all_books_query = all_books_query.filter(Rental.customer_id==customer_id).order_b... | [
"[email protected]"
] | |
637a4d73b01376a8357c87c6dbc7abaa6c3643b7 | c0e41a88ff45bdb7bbdc8e4276427b276eec5d13 | /kyo/python/1_function/6_math.py | a143e59a07c796621f035b244c5de37240af8055 | [] | no_license | sunzhqiiang888/KingSun | 7440748825ed72c411f8ff63c478ad412efa51ac | 7473cc30d398f1ae96cbc7175198052d518fef94 | refs/heads/master | 2020-03-08T08:17:17.284210 | 2018-04-15T03:15:25 | 2018-04-15T03:15:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 779 | py | #!/usr/bin/env python3
def math(s):
stack = []
m = dict([x for x in ")( ][ }{ ><".split()])
for c in s:
if c in '([{<':
stack.append(c)
elif c in ')]}>':
try:
l = stack.pop()
except:
return "缺少左括号!"
if m[c] !=... | [
"[email protected]"
] | |
51e2d060a963f7a2fab9bc18b2a90a3b1995e848 | 750ab8655c293ead5f835a70bafccf1994f6e232 | /jade/run_manager/wandb.py | 4a8ea83f1caef81da54544cca86acfd2965b4b57 | [
"MIT"
] | permissive | mfederici/JADE | ae1281d131d073832b2846d10c548bf69b244071 | 9a581af29085d80ba2fb5292a9836b5c241aadfc | refs/heads/master | 2023-06-08T22:53:44.261365 | 2021-07-05T10:03:28 | 2021-07-05T10:03:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,898 | py | import wandb
import os
from jade.run_manager.base import RunManager, BACKUP_NAME, CODE_DIR, flatten_config, inflate_config
import matplotlib.pyplot as plt
class WANDBRunManager(RunManager):
def __init__(self, config=None, run_name=None, run_id=None, verbose=False,
code_dir=CODE_DIR, username=None... | [
"[email protected]"
] | |
a7aebd8b565455d1449dd73646c2fa0fca0ce815 | c5463bb1f8e883498c627a0212a937818375110c | /volttron/bootstrap.py | 476a977d8aa53d4ec56e2dae8c822d507776cbdc | [
"BSD-2-Clause-Views"
] | permissive | cyrus19901/VOLTTRON-azure | 170a63eb04a40abb6658d22f4eed1e855986d393 | 9422d9dff9deb845d2f0b893199d84aa9dfa05b5 | refs/heads/master | 2021-01-16T00:03:33.069676 | 2017-08-10T19:00:17 | 2017-08-10T19:00:17 | 99,954,257 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,305 | py | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
# Copyright (c) 2015, Battelle Memorial Institute
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistri... | [
"[email protected]"
] | |
0f38b4d274aa3da2f5bb6a683d2fbe2da35282a0 | d82517dab71b7184ed504c5f2237637524113a53 | /s14/黑马/面向对象3/设计4S店(2).py | 96645f9ea42415190db6b18912021d541ff56b00 | [] | no_license | hurongyang/UUUU | 2326dcb21026df8e508f7c1c832a15293a1d8ce4 | a84555704fe6db0a6ece8c5d3c0f0f810ca74df9 | refs/heads/master | 2021-01-10T10:13:43.910107 | 2017-11-07T11:17:48 | 2017-11-07T11:17:48 | 54,094,779 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 603 | py | __author = "Hu Rongyang"
class CarStore():
def order(self,car_type):
if car_type == "索纳塔":
return Suonata()
elif car_type == "名图":
return Mintu()
class Car():
def move(self):
print("车在移动...")
def music(self):
print("正在播放音乐...")
def stop(self):
... | [
"[email protected]"
] | |
dca2f3644310a1e7c67b6ae89b9eb9ea3a0c23db | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/bob/b4037f9e2f47429f9d3e6ac8ed0fa8bf.py | 1a70ecf442bfba0ffa267c895ed7411ce53dcf4a | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 515 | py | class Bob:
def hey(self, ask):
conversation = Identify(ask)
if conversation.question():
return "Sure."
elif conversation.yell():
return "Woah, chill out!"
elif conversation.anything():
return "Fine. Be that way!"
else:
return "Whatever."
class Identify:
def __init__(self, ask):
self.ask = a... | [
"[email protected]"
] | |
93ea71308e6fd5d365bda5609b169c4f773ce234 | 2a3157ccb5376ffb03b13df4721afa405fbfc95d | /bin/virtualenv | 851dd46bb411994b649306face43a5dd104c9557 | [] | no_license | bopopescu/DemoDjango | 694501259322590d2959ef65cb6231ba1b1cf128 | b5ea252f0293ea63905a72045703b50815fbd673 | refs/heads/master | 2022-11-20T23:25:41.737807 | 2018-09-17T09:49:28 | 2018-09-17T09:49:28 | 282,543,262 | 0 | 0 | null | 2020-07-25T23:44:16 | 2020-07-25T23:44:16 | null | UTF-8 | Python | false | false | 241 | #!/home/jinesh/Documents/djangoproj/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from virtualenv import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[email protected]"
] | ||
d62a1e6ee7429d4badfe985780e74c2507865591 | 5eb02446f374a9c73f54a859668f46e80f4ef2fe | /ex35.py | f3e8b1edbe06119982737eb64ad94555c1bee7e2 | [] | no_license | Unique-Red/HardwaySeries | 1b93429da48b1b2c0c3b5a6de8e8f5c635cd959a | 3166a864c28e1ea49dce3f427f5f63429b4e2f53 | refs/heads/main | 2023-06-21T14:55:55.116124 | 2021-07-27T01:26:02 | 2021-07-27T01:26:02 | 370,170,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,047 | py | from sys import exit
def gold_room():
print("This room is full of gold. How much do you take?")
choice = input("> ")
if "0" in choice or "1" in choice:
how_much = int(choice)
else:
dead("Man, learn to type a number.")
if how_much < 50:
print("Nice, you're not g... | [
"[email protected]"
] | |
776d0b19881407fcf3376a214c627dbe68eb9edd | b2e3878ffd64e00cdfc2f4a2227f5b48aa0b7860 | /Modules/llpgenerator.py | 850c6c82240284fc06cb48062dedd35b95580905 | [] | no_license | TheoMoretti/PreShower_ALP-W | c5e149f664aa440b192c729be7540cdea6807cd2 | a93240c7390f0895561a734196beee637b0d8c38 | refs/heads/main | 2023-07-05T00:16:46.324734 | 2021-08-18T14:24:00 | 2021-08-18T14:24:00 | 313,635,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,832 | py | import pythia8
from various import *
from llpmodel import LLPModel
class LLPGenerator():
def __init__(self,model, setup="theory"):
self.model = model
self.setup = setup
#specify Dark Photon model
def specify_darkphoton(self,pythia,mass):
pythia.readString("ProcessLevel:all = off"... | [
"[email protected]"
] | |
7a5b181ef53123c6ce727d9255968c438b8932f4 | c82774869bc428b27037f5f6a1437e8477f28abe | /Modeling/Deprecated/1_Word2vec_Embedding_spm.py | f41cd6bf394d4762adc3292d72de78c5a9c41e7c | [] | no_license | spongebob03/Music-Recommend | 3c5cd9befc9d787aa3b0196f8fdedce896470adb | 23f89c7b94a9dfc3c2eea304f33ba32cd5ceebd6 | refs/heads/main | 2023-08-23T20:26:46.207396 | 2021-10-18T12:31:29 | 2021-10-18T12:31:29 | 399,398,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,771 | py | import sys
import argparse
from tqdm import tqdm
import numpy as np
import pandas as pd
import sentencepiece as spm
from khaiii import KhaiiiApi
from gensim.models import Word2Vec
from utils.arena_util import load_json
class Kakao_Tokenizer :
def __init__(self) -> None:
self.tokenizer = KhaiiiApi()
... | [
"[email protected]"
] | |
fab4ea867b286fdb37f34d77e6e1491c80492515 | e038ce1696e7903b7a08c8644ab9a196aeb4f017 | /arangoProject/arango/__init__.py | 3cbb0c8256316a04572f24e93026bb980dd4955d | [] | no_license | Sunghyeok93/Flask_project | c351667db6b3f8337c022314b67619159f599a76 | 65eae7f8459833f7b2e25f823ea09dfb087f113c | refs/heads/master | 2021-04-15T03:36:14.726083 | 2018-05-17T03:09:58 | 2018-05-17T03:09:58 | 126,173,756 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,374 | py | from flask import Blueprint, request, render_template, jsonify, session, json, Response
from arango.model.users import *
from . import connection, dbResponse
blueprint = Blueprint('_arango', __name__)
arango = connection.arangoConnect()
dbresponse = dbResponse.arangoResponse()
@blueprint.route('/login')
def login():... | [
"[email protected]"
] | |
cb67d2165007b907e26b0adbbebfc239ddfcc091 | 33589e038d48d097ce6da36fa0d9178736e8daa2 | /default_cards/BaseStrike.py | 47a69fc966cfe58d493063f1ce79d52c8183c95f | [] | no_license | Aleexm/BCObot | bd62f9e6c2eb34861a526ecc2a2ee662088c4996 | d54a60001e0231d673dd25b6fc9fa373db1daaf9 | refs/heads/master | 2020-06-22T06:25:40.154230 | 2020-04-27T01:16:03 | 2020-04-27T01:16:03 | 197,657,389 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | import sys
sys.path.append("..")
from Card import Card
from Option import Option
class BaseStrike(Card):
def __init__(self):
super().__init__(name="Strike", type=Card.Type.base, attack=4, priority=3, defense=5, min_range=1)
def __repr__(self):
return super().__repr__()
| [
"[email protected]"
] | |
8e2d2088f01a109bfc25a01cd8df43e2e61b6a55 | 0d4ea19eaab074f39bcfd07796244ed15b59d9d9 | /dino/folder.py | 2709ef84c8c8c3fb65c03ac641e82488ab21c077 | [
"MIT",
"Apache-2.0"
] | permissive | HimariO/ImgSim | b1af426d0922dd1bff2a6a6940a15129a581e3e0 | 9b99be7eac21bc2e86ea4c83b0ddd46e1b9b66d3 | refs/heads/main | 2023-08-13T12:11:32.756898 | 2021-10-14T09:19:21 | 2021-10-14T09:19:21 | 383,164,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,188 | py | import os
import glob
import math
from typing import *
import torch
import numpy as np
import pytorch_lightning as pl
from PIL import Image
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
from . import utils
class ImageFolder(Dataset):
MEAN = [0.485,
0.456, 0.406]
STD = [0.2... | [
"[email protected]"
] | |
3ca771e19dc6b23d14b4a8164764a44e5830a529 | 03195a6f98396fd27aedc3c06d81f1553fb1d16b | /pandas/core/_numba/executor.py | 0b59d0717a476b949054b145952a0c044d5e15b9 | [
"BSD-3-Clause"
] | permissive | huaxz1986/pandas | a08d80d27726fe141d449835b9a09265bca5b5e0 | ba2473834fedcf571d3f8245b4b24796873f2736 | refs/heads/master | 2023-06-11T02:20:14.544220 | 2022-01-12T04:40:06 | 2022-01-12T04:40:06 | 131,370,494 | 3 | 4 | BSD-3-Clause | 2018-04-28T03:51:05 | 2018-04-28T03:51:05 | null | UTF-8 | Python | false | false | 1,726 | py | from __future__ import annotations
from typing import (
TYPE_CHECKING,
Callable,
)
import numpy as np
from pandas._typing import Scalar
from pandas.compat._optional import import_optional_dependency
from pandas.core.util.numba_ import (
NUMBA_FUNC_CACHE,
get_jit_arguments,
)
def generate_shared_ag... | [
"[email protected]"
] | |
d58966ee9ea4c514981564727e37c53a3d07c319 | 4790769cef64b0fa8c96ebe2b2a6220ac8c8e671 | /mmdetection/configs/icartoonface/fr50_lite_dcn_gn_scratch_icf_wf.py | 3532127f97418b90d32772f713a3ea148846ca4a | [
"Apache-2.0"
] | permissive | keshawnhsieh/icartoonface_v2 | 72341b3745c254e549376229689bf8fed8706a26 | eca1db41f7f067e2ca8dd5a5e791016ff0350ace | refs/heads/master | 2022-11-30T15:00:12.284543 | 2020-08-17T15:59:49 | 2020-08-17T15:59:49 | 272,957,476 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | _base_ = './fr50_lite_gn_scratch_icf_wf.py'
model = dict(
backbone=dict(
dcn=dict(type='DCNv2', deformable_groups=1, fallback_on_stride=False),
stage_with_dcn=(False, True, True, True))) | [
"[email protected]"
] | |
29c2b6fed2ce4af8db9eda6d8d3a6890a05f7aaa | 89a9d31cd37ffd95a4d2b942b8e183eea5f499d2 | /envs/cartpole-envs/cartpole_envs/envs/CartPoleSwingUpEnvCm05Pm07Pl07.py | 08d480f1b53e6d28e6bec199b1520fac89193ac0 | [] | no_license | mxu34/mbrl-gpmm | 9ba12364c1917972b917832e6ab3a3f381f4d2bf | 0cd89919cb45718aa29f902bc4d2cdeed17d4dc9 | refs/heads/master | 2022-11-06T14:44:22.031728 | 2020-06-23T01:21:08 | 2020-06-23T01:21:08 | 273,567,557 | 25 | 1 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | from .cartpole_swingup_temp import *
class CartPoleSwingUpEnvCm05Pm07Pl07(CartPoleSwingUpEnv_template):
def __init__(self):
super().__init__( masscart =0.5, masspole=0.7, polelength=0.7) | [
"[email protected]"
] | |
ce80b79b3d6c15b24c5624275137c3633ce47a76 | f6c3fa5d5ceaf8bb9a9ab52fc64d121ee0e92a51 | /E4.py | 234aaa54ca6039f45cfdecdfd7852797c83d5ba1 | [] | no_license | AdrianMartinezCodes/PythonScripts | 15cef21f6800207b54ba73763c86fcd96bdcace7 | 8009e78ac2914c96c001d70a4611d60ac91a6a47 | refs/heads/master | 2023-03-30T21:17:13.219192 | 2021-04-07T06:15:38 | 2021-04-07T06:15:38 | 355,431,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | num = int(input("Please enter a number to divide: "))
diviser_list = []
for i in range(1,num):
if num%i == 0:
diviser_list.append(i)
print(diviser_list)
| [
"[email protected]"
] | |
99f8c1a49641c470c778fea08467ebaf332d4693 | 8997a0bf1e3b6efe5dd9d5f307e1459f15501f5a | /graph__networkx__d3__dot_graphviz/graphviz__examples/generate__as__bytes.py | cad13511e6c2200cf6958416c256790986119d81 | [
"CC-BY-4.0"
] | permissive | stepik/SimplePyScripts | 01092eb1b2c1c33756427abb2debbd0c0abf533f | 3259d88cb58b650549080d6f63b15910ae7e4779 | refs/heads/master | 2023-05-15T17:35:55.743164 | 2021-06-11T22:59:07 | 2021-06-11T22:59:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
# pip install graphviz
from graphviz import Digraph
g = Digraph('G', format='svg')
g.edge('Hello', 'World')
# Get bytes
print(g.pipe())
print(g.pipe('png'))
# OR:
# g.format = 'png'
# print(g.pipe())
print(g.pipe('pdf'))
| [
"[email protected]"
] | |
4cc349ba956cce3ae174f5c5f3c10fc651c8934b | f875c94f596edc4771ee5e526f0d576ddc195de8 | /blogapi/apiview.py | 098d47b90c5751f4aabe1ebdee78a688c2708bd7 | [] | no_license | OLAOSEBIKAN/reactNativeDjangoBlogApi | 6d673be18ae1e85fdd01eaad8938067cd77fae76 | b56c45eac49df7fd5fe5ae1e85bfefb47c62923d | refs/heads/main | 2023-02-10T13:09:34.929886 | 2021-01-08T17:04:44 | 2021-01-08T17:04:44 | 327,963,484 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,341 | py | from django.contrib.auth import authenticate
from rest_framework import generics, status
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Post
from .serializers import RegisterSerializer, PostSeri... | [
"[email protected]"
] | |
fc668b0f4beb102abcf466f2f54e0323dd94b77f | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /k9usvZ8wfty4HwqX2_2.py | 6df3da8982061b94fd50d4d07581a39b1c4e148e | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,045 | py | """
Create a function to check whether a given number is **Cuban Prime**. A cuban
prime is a prime number that is a solution to one of two different specific
equations involving third powers of x and y. For this challenge we are only
concerned with the cuban numbers from the **first equation**. We **ignore**
the cub... | [
"[email protected]"
] | |
dbcdb025a6cf7fbdf313e3dd3a1286e17ad37472 | 7d7462ca9b94934c71886a1fcf09ea7f16ca94b8 | /python/python_assignment_programs3/pro7.py | dca2fded3d4fbf8023a742259dfcbe5887f12670 | [] | no_license | karthik1017/mca | 16de1c0b87e5d5617de61dc08a5d61d6c7cf8ec7 | b2182c2bf62151150304aad23d476ee956dbf605 | refs/heads/master | 2020-04-22T20:10:53.308901 | 2019-08-14T07:22:30 | 2019-08-14T07:22:30 | 170,632,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | ch=65
for i in range(0,5):
for x in range(1,i+2):
print(chr(ch), end="")
print()
ch+=1 | [
"[email protected]"
] | |
f4f5aba0f8f2e294996ec623c74604d180bfc276 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/2D_20200722181027.py | ea6e6f492e2b93ebfeedfabbb4e5edb694f6f6ce | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,348 | py | def array(n,m):
# where n is row size and m is column size
array = [[0 for x in range(n)] for x in range(m)]
print(array)
a = [[2, 4, 6, 8, 10], [3, 6, 9, 12, 15], [4, 8, 12, 16, 20]]
# where the first arguement reps the row and second arguement reps the column
print(a[0][3])
from sys import... | [
"[email protected]"
] | |
036d79f27089d61da8159cdbab9c887da4e45d27 | ac790417f7318ab48946dc1226178846cf2a0216 | /resume/forms.py | 283e032e8ecf5ff8fac23a50b9ee5981cb697d85 | [] | no_license | Ubaydah/Resume | f3b544be9305d11b5208d8088c92e16c4f6e9a75 | 63bc7c85acff2f047bd4628c86bc59c8a0c1429a | refs/heads/main | 2023-07-05T03:05:33.893114 | 2021-08-21T16:40:18 | 2021-08-21T16:40:18 | 398,582,089 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | from django.db.models import fields
from django.forms import ModelForm
from .models import Contact
class ContactForm(ModelForm):
class Meta:
model = Contact
fields = '__all__'
| [
"[email protected]"
] | |
8baf39710e255504a040b81bb6999e6e90b09408 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nnn998.py | 6856125ce675d837a7794fd06121ad13f12b0ccf | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 120 | py | ii = [('UnitAI.py', 2), ('WadeJEB.py', 1), ('MereHHB3.py', 4), ('StorJCC.py', 2), ('SomeMMH.py', 2), ('MereHHB2.py', 1)] | [
"[email protected]"
] | |
d72a22dd378cd6a2c077576c25f292ec76cd2435 | e727251c8ad860aad795357889bf0ceed61c53ed | /MsvcScript.py | 5de4b64b0b0846a1b4a0e1e8b61dc03ebd6779ef | [] | no_license | Trietptm-on-Coding-Algorithms/idascripts | 1a06ac4ca979fe7f5ccbf1da8fba46fb5197b33c | 385a44b1a1a114c420224cfa638b29705ae9a103 | refs/heads/master | 2020-03-21T17:57:32.136033 | 2014-06-25T21:58:20 | 2014-06-25T21:58:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,099 | py | import idaapi
import Msvc.Rtti
Msvc.Rtti = reload(Msvc.Rtti)
print "*" * 40
print "dev_zzo's Uber MSVC Script!"
print "*" * 40
def rtti_scan() :
Msvc.Rtti.scanRtti()
def rtti_td(ea) :
try :
print Msvc.Rtti.TypeDescriptor(ea)
except Exception, e:
print str(e)
def hk_rtti_td() :
rtti_td... | [
"[email protected]"
] | |
32e7fa01aaac221c663b3755550af8ca71e6301f | 827f75462d8f78abc416128e33ee25f278606e18 | /Program_Python_code/IOT_02/temp.py | 7114a6a0a836d63538f4e522ad8af85031904a01 | [
"MIT"
] | permissive | skyhigh8591/VocationalTraining_LearningCode | 5a2573933a9a290195987b6580702105263cc67c | 5f3c0f11874618919002126863772e0dd06a1072 | refs/heads/master | 2022-12-13T20:14:28.316342 | 2020-09-09T02:15:14 | 2020-09-09T02:15:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import matplotlib.pyplot as plt
listx = [1,5,7,9,13,16]
listy = [15,50,80,40,70,50]
plt.plot(listx,listy)
plt.show() | [
"[email protected]"
] | |
923c8acffc221e4307035641e78cc6c987a1417d | 5cf5ec4cec8c312c8a16efacceb3612e5d5c5fb4 | /code2021/day16/p1.py | 50ce24472bfd6446b5b8950f5fe4376e401ac9e2 | [] | no_license | zac112/adventOfCode | a9523f4ff7dc4f3af0137807d6e09eb9692531bf | 6f5955a4c827c3513e0d83877708175976ceb204 | refs/heads/master | 2022-12-26T02:17:41.554781 | 2022-12-25T23:45:53 | 2022-12-25T23:45:53 | 160,374,492 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,435 | py | with open('data.txt') as f:
data = f.readline().strip()
#data = "A0016C880162017C3686B18A3D4780"
#data = "C0015000016115A2E0802F182340"
binary = bin(int(data,base=16))[2:]
print(binary)
binary = list(binary)
class Literal():
def __init__(self,val, version):
self.val = int("".join(val),2)
self.... | [
"[email protected]"
] | |
ef456e67563e978d78cbc6a2c22cf101e2d80c1b | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/adjur.py | b95db66e7aeb7eacf64d904654b1562db5591749 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 370 | py | ii = [('GodwWSL2.py', 4), ('FerrSDO3.py', 1), ('CarlTFR.py', 2), ('LyttELD.py', 1), ('TalfTAC.py', 2), ('KiddJAE.py', 1), ('BailJD1.py', 1), ('ClarGE.py', 1), ('LandWPA.py', 1), ('AinsWRR.py', 1), ('LandWPA2.py', 2), ('TalfTIT.py', 1), ('NewmJLP.py', 1), ('SoutRD.py', 1), ('HowiWRL2.py', 1), ('BailJD3.py', 1), ('HogaGM... | [
"[email protected]"
] | |
86b66c96c2d6d9dd783f304f8ff52968a5670b04 | 0c4419e1822d2d9acebd18f688d4babf6780a239 | /runner_master/runner/utils/__init__.py | 42be164d10fb8587014ee1e7d7d1370a1871c631 | [
"MIT"
] | permissive | bigvideoresearch/SCC | a852d2200c47f6f628fc63d836f323d23035e446 | f26cdb6aaf248b5112812dbdac1f1b5086aebccc | refs/heads/master | 2023-04-11T10:29:55.529491 | 2021-04-19T02:24:00 | 2021-04-19T02:24:00 | 359,295,295 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | # from .tensorboard import *
from .rank0_tensor_cache import *
from .misc import *
| [
"[email protected]"
] | |
fc214f4aa80f4a5e84e0ec03c061e769d17ae787 | 5c9d0f7a0b74613dc633004dcaa000f36cdd6096 | /tests/functional/utils.py | b6e91ac64161740c0d15445020193287f35103df | [
"Apache-2.0"
] | permissive | mayani-nv/model_navigator | 05291ed5f2fea7fd286da38f231cf3e391d2f82a | 925255bbeb9be7ac6f35407267e87a29a33087ab | refs/heads/main | 2023-07-17T02:24:13.432380 | 2021-08-17T15:24:15 | 2021-08-17T15:24:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,892 | py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
"[email protected]"
] | |
517a32400b135c30df9b22a971e141d5474c896b | 9436682c3d21fbe2737724ce24f2d7c79b5f7598 | /transformerLM/my_dictionary.py | a7551eb478ba782c5c5f05f740d193af50565507 | [
"BSD-3-Clause"
] | permissive | grandeelee/codeswitch-challenge-LM | 5f2cea2db29b02e54d4b36f69b85a0e3b4689442 | d44f922d25df34a5905917b0351a7bbf3cccf22f | refs/heads/master | 2022-08-12T05:43:45.836690 | 2019-12-20T01:39:41 | 2019-12-20T01:39:41 | 210,730,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,135 | py | import os
from collections import Counter, OrderedDict
import numpy as np
from tqdm import tqdm
import mmap
import torch
from logging import getLogger
logger = getLogger(__name__)
def get_num_lines(file):
"""
a helper function to get the total number of lines from file read quickly
:param file:
:retu... | [
"[email protected]"
] | |
4a896a192b264dbd2592b138999899b9d708d0f9 | 97b5505e6ebf0c2045b091cd7855f7b51e02185d | /1.py | 415ff7aaa3da212f9980231b243020bfdc1b0ade | [] | no_license | lala1919/python | 7e2c25ee92e2149a8302041385f163088558928e | bb2ca17ea942c76e9ac887a10673dd4d0370df52 | refs/heads/master | 2023-01-31T19:01:10.145026 | 2020-12-13T02:18:48 | 2020-12-13T02:18:48 | 316,654,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,968 | py | # [변수와 데이터타입]
# 주석(comment) : # 입력 또는 ctrl + / 로 표현한다. 메모같은 것
# 변수(variable) : 변하는 수
id = "pencil"
print(id)
print("뭐로 쓸까요? - ",id,"으로 쓰죠.")
# 숫자 변수 : ""를 입력하지 않으며, 숫자. 연산가능. 데이터타입이 숫자인 변수.
num = 10
plus = 1
minus = 2
multiply = 3
divide = 5
print(num + plus)
print(num - minus)
print(num * multiply) # 30
print(... | [
"[email protected]"
] | |
95748eb243f692d15954f276e6a1972724e02f4b | 82922001f908e899d594c5b81567650d6179b64e | /SQL/ReadCSV.py | 673830f1fb27fae6e2aa16e0d9ad31f063cbb93e | [] | no_license | yves40/python | 29d1ec3dc33d2d7bf38a0fe192284fa065af8948 | 258777bea1be5d40853c4cbbad31e789300fe32a | refs/heads/master | 2022-09-29T00:32:03.407712 | 2022-09-12T08:38:32 | 2022-09-12T08:38:32 | 164,092,900 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,376 | py | #!/usr/bin/python
# coding: utf8
#-----------------------------------------------------------------------------------------------------------
# ReadCSV.py
#
# Aug 09 2016 Initial
#-----------------------------------------------------------------------------------------------------------import sys
from __future_... | [
"[email protected]"
] | |
68a610b4031ce7289b9815128385f9e2f76c905c | 6349e2d51504500b20aeb7f784a569e218fd2650 | /palindrome_index.py | 111f34f67131b608138bb159c92fb4c351924472 | [] | no_license | dhananjaysahu79/hackerRanksubs | 4a963eaf7d4f72fdf62c236f26160a2b0f3ef4ba | e5a711c6805902997f1339829583002cda332c73 | refs/heads/main | 2023-08-12T10:08:42.179209 | 2021-09-30T17:40:56 | 2021-09-30T17:40:56 | 379,961,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 832 | py | link = 'https://www.hackerrank.com/challenges/palindrome-index/problem'
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'palindromeIndex' function below.
#
# The function is expected to return an INTEGER.
# The function accepts STRING s as parameter.
#
def palindromeIndex(... | [
"[email protected]"
] | |
608e364f79ffd4650f6c6bb5d9a4bf570f427b91 | d563508e16932deb44c59c602834e2817d94e583 | /nn/extended_layers.py | 4afe8c3250172c10641888bc010f284cc13f5ab3 | [] | no_license | abiraja2004/summarization-5 | 6866c15cc42958088e53eb02926b9143d045276c | 0aed22b793937bbe17e1c0621da6023a86327238 | refs/heads/master | 2021-09-08T16:10:14.686644 | 2018-03-11T05:45:14 | 2018-03-11T05:45:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,839 | py | import numpy as np
import theano
import theano.tensor as T
from theano.ifelse import ifelse
from theano.sandbox.rng_mrg import MRG_RandomStreams
from nn.advanced import RCNN
from nn.basic import LSTM
from nn.initialization import create_shared, random_init, sigmoid
class ExtRCNN(RCNN):
def forward(self, x_t, mas... | [
"[email protected]"
] | |
f3d4772cd3c835c606ce487aeab851ffdf081c5d | 85793c77984f254c0b1c7d5d2cb9e8e52cbbc753 | /problem020.py | cf95adef43fbbf9865de093a732c8494ffc67a62 | [] | no_license | alexanderteves/project-euler | 3604728e4b2f7045c96aac3cabadcf1cb366dbbb | 2ba6a526092dcdbbf0ecd00822a8e2acf05d4b65 | refs/heads/master | 2021-01-19T21:27:50.444717 | 2012-10-22T14:15:52 | 2012-10-22T14:15:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 114 | py | import re
import math
x = []
for n in re.findall('\d', str(math.factorial(100))): x.append(int(n))
print sum(x)
| [
"[email protected]"
] | |
00b1a11eae7b2cec07120665c6de7285c8bbdae3 | 7ce479cac0a14d924159db9c784e3325b8f0bce7 | /schemaorgschemas/Thing/Intangible/Enumeration/MedicalImagingTechnique/Ultrasound/__init__.py | f0e44756fdb174fb8619176fe9fda3fa72543f5a | [] | no_license | EvelineAndreea/AGRe | 1f0c27237eb047a60bbcfb8d73e3157035406409 | b952125896a82741f6617c259dd4060954583180 | refs/heads/master | 2020-04-08T16:08:11.517166 | 2018-11-28T07:15:56 | 2018-11-28T07:15:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | # -*- coding: utf-8 -*-
from schemaorgschemas.djangoschema import SchemaObject, SchemaProperty, SchemaEnumProperty, SCHEMA_ORG
from django.conf import settings
class UltrasoundSchema(SchemaObject):
"""Schema Mixin for Ultrasound
Usage: place after django model in class definition, schema will return the sche... | [
"[email protected]"
] | |
71cf9ef7365861b60961c7c755e9c789b1f5252f | d6d4612967636fa0452a7b84bc38adbb7a21d415 | /mlflow-project-driver.py | ffa296184ade7130926d126724dee485a7f34915 | [] | no_license | MaisaDaoud/celeb-mlflow-example | 50a0bb9b91c5b1af6deeaa107d63abe30c774631 | 9a56efe5ce47d9561e7a4e172da3120e3f53a59d | refs/heads/main | 2023-01-30T17:37:15.259333 | 2020-12-15T21:26:50 | 2020-12-15T21:26:50 | 321,790,148 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 996 | py | import mlflow
mlflow.projects.run(
'https://github.com/MaisaDaoud/celeb-mlflow-example',
backend='local',
synchronous=False,
parameters={
'batch_size': 32,
'epochs': 10,
'convolutions': 3,
'training_samples': 15000,
'validation_samples': 2000,
'randomize_... | [
"[email protected]"
] | |
252f84d6a95e092876dd4c65bc19bbc252cab747 | 8f619dc8adb894d92590b14af0e5a4b6f7981c44 | /users/api/serializers.py | 106e4e01304d8c13262022590aaf055f510e641d | [] | no_license | ArashMoshirnia/store_with_smart_recommender | e427c97ae18945bb3a0d63b6a8efd2620c048314 | ccfddd3c03963d820054f2f418037ae0b81b10f5 | refs/heads/master | 2023-07-05T03:09:50.181457 | 2021-08-10T14:20:34 | 2021-08-10T14:20:34 | 352,128,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | from rest_framework import serializers
from users.models import User
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(write_only=True)
class Meta:
model = User
fields = ('id', 'username', 'password', 'email')
def create(self, validated_data):
u... | [
"[email protected]"
] | |
f2961d2cf0e5afc4a1c5617b84a68c33f5035a08 | 5f91ef601aa3e58cb5c24f1a4cfefd264078f4ee | /Python Task Day4/Text Wrap.py | fbee398512838dcdefb4e3d1b75cbbab797692cd | [] | no_license | Jayasree-Repalla/Innomatics_Internship_APR_21 | 386a71d2a7da788aa6088087c5e42c97271c6afe | f5505045a09b8445c704c0b0135502731fc42a5f | refs/heads/main | 2023-05-09T13:59:20.194465 | 2021-05-29T12:21:47 | 2021-05-29T12:21:47 | 363,651,405 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | import textwrap
def wrap(string, max_width):
l=textwrap.wrap(string,max_width)
str1=''
for i in l:
str1=str1+i+"\n"
return str1 | [
"[email protected]"
] | |
44856c368483e969256dc97c44a426028c3bbf50 | 980841fc87bba9a00d849f372528b888453b89ba | /Python 3 Scripting for System Administrators/Accepting Simple Positional Arguments.py | 20e611ada99bb5acedb5953be31816bf9a56f018 | [] | no_license | Frijke1978/LinuxAcademy | c682eedb48ed637ffe28a55cdfbc7d33ba635779 | 5100f96b5ba56063042ced3b2737057016caaff3 | refs/heads/master | 2022-03-24T12:28:25.413483 | 2019-12-21T12:27:02 | 2019-12-21T12:27:02 | 229,418,319 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,205 | py | Accepting Simple Positional Arguments
Most of the scripts and utilities that we work with accept positional arguments instead of prompting us for information after we’ve run the command. The simplest way for us to do this in Python is to use the sys module’s argv attribute. Let’s try this out by writing a small script... | [
"[email protected]"
] | |
8053e4303904863cf6697e7b52d39559a3132db8 | ab6d64c36ddbdc042f6676d6e10f6a25360870cd | /test45_pruebas_p2.py | 00623e6da2486977da8020aaeacda50fba4cc2df | [] | no_license | Leduin-Abel/Python | 3219867ef39c81870a720c7ce22fc7c28cbdb8be | 925c907e0215b93d251c4b3c3d1383206332251d | refs/heads/main | 2023-07-09T14:43:31.488191 | 2021-08-22T23:24:27 | 2021-08-22T23:24:27 | 398,921,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | import math
def raizCuadrada(listaNumeros):
"""
La función devuelve una lista con la
raíz cuadrada de los elementos númericos
pasados por parámetros en otra lista
>>> lista=[]
>>> for i in [4,9,16]:
... lista.append(i)
>>> raizCuadrada(lista)
[2.0, 3.0, 4.0]
>>> lis... | [
"[email protected]"
] | |
c6564498023bda58af9884f9c42dcde4fc338d1a | 4ab698389f13f0552787de0dd846cf9b01aae4bc | /csuro_intro_py/scripts/nodo_iterativo.py | 93a84e73d790d9ecc08a484d5fe15caa9bdfb467 | [
"MIT"
] | permissive | IntelligentRoboticsLabs/CSUROS | 575a4e06a42a946ba75d6f06cbc53e524f606be6 | 95a2d0b1d7c9edc7351a6fb510936fc293a63428 | refs/heads/master | 2020-05-02T05:34:35.654342 | 2019-05-26T07:35:55 | 2019-05-26T07:35:55 | 177,774,700 | 1 | 4 | null | 2019-05-21T07:54:31 | 2019-03-26T11:28:22 | C++ | UTF-8 | Python | false | false | 400 | py | #!/usr/bin/env python
import rospy
if __name__ == '__main__':
try:
rospy.init_node('iterativo', anonymous=False)
rate = rospy.Rate(20)
count = 0;
while not rospy.is_shutdown():
count = count + 1
rospy.loginfo("iteration %d" % count)
rate... | [
"[email protected]"
] | |
c807082254ccacd00922058c4aff343aabe56cb0 | 46a784ddc9377216faa9ba205729ca6524f901b6 | /classoutput.py | 4941a65639929d210976591e886a48ed590b58f3 | [] | no_license | asiddiq1/MapQuestAPI | 9933253e9baaea54df0fb1f0d6f09035ca577a0c | c2d8813238cb3023169c2f1dae682dd3bb545696 | refs/heads/master | 2021-05-15T14:24:34.920005 | 2018-04-10T00:39:18 | 2018-04-10T00:39:18 | 107,197,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,649 | py | #Aisha Siddiq lab 12:00 - 1:50 pm (project 3)
class STEPS:
def __init__(self, jsondata):
self.jsonD = jsondata
def return_data(self)->list:
'''Returns the json steps in a list
'''
directions = ["DIRECTIONS"]
for items in self.jsonD['route']['legs... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.