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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d48b98c5bc5c10dfb688d580ddef94ddd8f71891 | df015a639d78b2c5c40463356c93d67effca2f4c | /algo/ten.py | e759915d1597f9d54aec23ceb371b09ae5be835c | [] | no_license | opklnm102/python-tutorial | 5b53cd234b1b519230776cf4308ff1c41f62a2ae | cb400d5e318c59d42703ce1f8a12c5693bea07c8 | refs/heads/master | 2020-12-29T02:38:32.172485 | 2017-03-31T23:34:12 | 2017-03-31T23:34:12 | 48,275,041 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | #문장에서 알파벳 갯수 카운트
string = str(input("input string; "))
alpha = str(input("input search alphabet: "))
count = 0
for i in string:
if i == alpha:
count += 1
print(count) | [
"opklnm102@gmail.com"
] | opklnm102@gmail.com |
a882e8c2d54e99f64a919245322746ff4a2e8004 | 5ee0f0f8d96f6666f4f0a065c754e9469924d2d4 | /xyz_web/contributions/views.py | 7ab84f7447599825f60357220fcbfbe6153cb633 | [
"MIT"
] | permissive | amunso/xyz_web | 81e1533fd403ba45064a6de5c33593113a11d29c | 756e217c55ccbd22be8de8228f758cdb5581227a | refs/heads/master | 2022-12-20T10:37:17.551520 | 2020-09-23T17:34:07 | 2020-09-23T17:34:07 | 298,033,987 | 0 | 0 | null | 2020-09-23T16:45:16 | 2020-09-23T16:45:15 | null | UTF-8 | Python | false | false | 2,437 | py | from django.forms import ModelForm, ModelChoiceField, RadioSelect, CheckboxSelectMultiple, Form, ModelMultipleChoiceField
from django.views.generic.list import ListView
from django.views.generic.edit import CreateView, FormView
from .models import Contribution, Vote
from django.utils.html import mark_safe
from django.u... | [
"thorvalb@stud.ntnu.no"
] | thorvalb@stud.ntnu.no |
7229d4da19911690a42c9a6785e092cf7365c860 | 818325a5f0d7c2a105e81ce67bc9b8608b835f03 | /app.py | 8f19ac7cfb635f27d48260be767be5565e2f0e5c | [] | no_license | seladb/simple-analytics2 | 134121e1195e6539ff7106637e8eadb12e687a13 | ec8d71af9785c6634ddabe9366ff75f4c64ff7b6 | refs/heads/master | 2023-05-08T14:15:23.167377 | 2021-06-02T01:12:53 | 2021-06-02T01:12:53 | 372,994,564 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 950 | py | import logging
# https://docs.python.org/3/library/queue.html
import threading
import queue
from flask import Flask, request
from flask.logging import default_handler
from services.enrich_geo_location import EnrichGeoLocation
from services.request_anomaly_ranking import AnomalyRanking
from services.db_service import DB... | [
"pcapplusplus@gmail.com"
] | pcapplusplus@gmail.com |
6f1f73cfc55c33a0424408de4d246780a15a3935 | d4ea02450749cb8db5d8d557a4c2616308b06a45 | /students/luyao_xu/lesson05/mailroom3.py | f320ecd0b76e8fb1819cb61f48cc0ffa9f73bbc0 | [] | no_license | UWPCE-PythonCert-ClassRepos/Self_Paced-Online | 75421a5bdd6233379443fc310da866ebfcd049fe | e298b1151dab639659d8dfa56f47bcb43dd3438f | refs/heads/master | 2021-06-16T15:41:07.312247 | 2019-07-17T16:02:47 | 2019-07-17T16:02:47 | 115,212,391 | 13 | 160 | null | 2019-11-13T16:07:35 | 2017-12-23T17:52:41 | Python | UTF-8 | Python | false | false | 4,972 | py | #!/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
from pathlib import Path
def initialize_db():
don_1 = {'name': 'Amy Walker', 'donation amount': [18900.90, 4500]}
don_2 = {'name': 'Peter Thomson', 'donation amount': [9999.99, 500, 6000.88]}
don_3 = {'name': 'July Jensen', 'donation amount':... | [
"xuluyao19931213@gmail.com"
] | xuluyao19931213@gmail.com |
c80f65a316cce749b4402378910cf0b906c8d8fa | 5d2a2887bafa327492022fc0826738cc2d3dbae0 | /day_01.py | 31651d03616bdc7ff6b183dffed597696ff81db9 | [] | no_license | mullevik/advent-of-code-2019 | c32a09a8674bef4f828f4cc0d3624b714c21a16a | 876ceb350db7e0241015740e093b99cd8d7a7485 | refs/heads/master | 2020-09-22T12:30:27.159006 | 2019-12-13T19:43:38 | 2019-12-13T19:43:38 | 225,195,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | import fileinput
def calculate_fuel(mass: int) -> int:
return (mass // 3) - 2
if __name__ == "__main__":
total_fuel_requirement = 0
for line in fileinput.input():
module_mass = int(line)
fuel_requirements = []
fuel_requirement = calculate_fuel(module_mass)
while fuel_re... | [
"muller.viktor.muller@gmail.com"
] | muller.viktor.muller@gmail.com |
3e122dfa2ff830a984a694cea5458b47c7620559 | 1e74402cd0db4e283e9b274f59035d98344cc83c | /setup.py | eab885a3b4b7911e77ee3a7e6a2781c36909c3fa | [
"MIT"
] | permissive | MarkMurillo/python_ctype_structure_example | 025d7f8c38b21333dc0a2bc287f92691adb8dd9a | 9e889cc4cbdeab8433c396262f086071bb961e13 | refs/heads/master | 2020-03-13T21:49:37.620364 | 2018-10-14T18:59:58 | 2018-10-14T18:59:58 | 131,304,851 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | """ setup.py
Builds the test c-extension python module.
Author: Mark Murillo
"""
from distutils.core import setup, Extension
testModule = Extension(
'testMod',
include_dir=[],
libraries=[],
library_dirs=[],
sources=['test.c']
)
setup(
name='testMod',
version='1.0',
description='A lib... | [
"mark.sj.murillo@gmail.com"
] | mark.sj.murillo@gmail.com |
cd95b19f6d4f93b14d14a0883f75efb49067cd20 | 0ba2e5061577f6286ff9265ef1df9aca96769445 | /sort/python/Piegon Sort.py | cc6205f804dcef84994b2ca7406186657254e296 | [
"CC0-1.0"
] | permissive | ZoranPandovski/al-go-rithms | 68d5d02f80a61de9baf8e50a81a52e7d0b3983a0 | 4ae6ba54e90af14af236e03e435eb0402dcac787 | refs/heads/master | 2023-09-04T16:04:04.321676 | 2023-06-06T15:22:16 | 2023-06-06T15:22:16 | 93,438,176 | 1,421 | 2,445 | CC0-1.0 | 2023-06-15T14:24:28 | 2017-06-05T19:20:20 | Jupyter Notebook | UTF-8 | Python | false | false | 1,722 | py | """
This is an implementation of Pigeon Hole Sort.
For doctests run following command:
python3 -m doctest -v pigeon_sort.py
or
python -m doctest -v pigeon_sort.py
For manual testing run:
python pigeon_sort.py
"""
def pigeon_sort(array):
"""
Implementation of pigeon hole sort algo... | [
"zoran.pandovski@gmail.com"
] | zoran.pandovski@gmail.com |
032e16ace2a8d54eed495da1838d6c543d7890c8 | a907c2cdcf2587dad8cafeef3b851addaef127de | /fnndsc.py | 1a903afea89822bc8c2fcef87ef4b1e41de6b72f | [] | no_license | FNNDSC/scripts | 10d443612fcf8a206fa33c13dbc1f5aa17d2e2c9 | fafa74576d7f37b901cdc8c28e6343141df648eb | refs/heads/master | 2023-04-17T01:46:09.155442 | 2023-04-11T02:15:37 | 2023-04-11T02:15:37 | 2,512,788 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,127 | py | #!/usr/bin/env python
import os
import sys
import string
import getopt
import argparse
import csv
from _common import systemMisc as misc
from _common import crun
import error
import message
import stage
class FNNDSC():
'''
The 'FNNDSC' class provides the base infrastructure for batched p... | [
"rudolph.pienaar@gmail.com"
] | rudolph.pienaar@gmail.com |
910c40a79a455b4bbc008bbdbb80be0f86e7421c | fbea0f58191fd13c5fecc86d24b02032761699bc | /users/urls.py | c8ca8686832ef10215ce800de49d5dc25dbc720f | [] | no_license | HOTGU/nbnb-clone | ef29b339032a2fc3d07035ba5c1e456933cb5434 | fae3a4f2aa5b3c5ed983c2fc34b223e8d0814703 | refs/heads/master | 2023-07-14T05:01:07.506626 | 2021-08-23T07:52:16 | 2021-08-23T07:52:16 | 383,764,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | from django.urls import path
from . import views
app_name = "users"
urlpatterns = [
path("login/", views.LoginView.as_view(), name="login"),
path("login/github/", views.github_login, name="github-login"),
path("login/github/callback/", views.github_callback, name="github-callback"),
path("login/kakao/... | [
"gksrn42@gmail.com"
] | gksrn42@gmail.com |
f6415420e3a9b8fff87cdc63145da81445c0f1e5 | e6b9527ca455149f2a257e7fa8936c3b67bbb108 | /ruby/test_ruby_bindings.py | 18c9ccd7df236f44ba2d2cc72079059627631092 | [] | no_license | theoweiss/generators | ae269659e794ca24c49b5ff4fc52aaaf795b0eb6 | 13d1f8f2ed70aaa85ee001f57852f9233064c748 | refs/heads/master | 2020-04-22T18:15:24.371245 | 2019-02-13T17:08:29 | 2019-02-13T17:08:29 | 170,570,998 | 0 | 0 | null | 2019-02-13T20:00:41 | 2019-02-13T20:00:41 | null | UTF-8 | Python | false | false | 1,955 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Ruby Bindings Tester
Copyright (C) 2012-2014, 2017-2018 Matthias Bolte <matthias@tinkerforge.com>
test_ruby_bindings.py: Tests the Ruby bindings
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
... | [
"matthias@tinkerforge.com"
] | matthias@tinkerforge.com |
ffdc58bdbc38eae855b064d75da1b278d2b35797 | 825ab7f2431bf040259bc6f725054152d8bf6da3 | /Projeto Naval Final/TABULEIRO_Brincando.py | 6cf470e3cfccc064eb008b39a1ada2e293d94db1 | [] | no_license | leandro1989/Projetos | f70856be008ac1e59ddea339d0d74b8512e52353 | dc8931e1fc7caf1ab03414d8f07f7373f0790ad3 | refs/heads/master | 2021-01-19T23:24:57.826068 | 2017-04-21T11:14:12 | 2017-04-21T11:14:12 | 88,975,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,615 | py | from random import *
import sys
from termcolor import colored
def resultado():
print('')
print('Os resultados foram:')
print('')
for i in range(len(nomes_jogador)):
print(nomes_jogador[i], '--->' , contador_de_seus_acertos)
def cria_grelha(matriz):
'''esta função cria uma matri... | [
"leandrolinken@gmail.com"
] | leandrolinken@gmail.com |
ba8682459d95aafa9bb23a4013ed976df4ed69dd | 289e3289897f7e794e3f6b281c727f74185ab5ff | /deid/dicom/validate.py | 061406f407b7b40643fa3c4188ca3e56c76cc461 | [
"MIT"
] | permissive | W7CAM/deid | fd3df596e0c48d243b838c1a31ed5376f02eaf61 | 808bbf6355b923f26694d8a73dc21d35a857a145 | refs/heads/master | 2020-03-30T02:12:11.790957 | 2018-09-19T15:47:57 | 2018-09-19T15:47:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,932 | py | '''
utils.py: helper functions for working with dicom module
Copyright (c) 2017-2018 Vanessa Sochat
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 limitati... | [
"vsochat@stanford.edu"
] | vsochat@stanford.edu |
9e166518f56b8cab93f0dc4a84da5f13cc0fbc28 | 0d2668b04d29e52972e9c2c71df8a597e9e3b06f | /collectData.py | cafb864218497d186bd3de75e1197a849a10cb75 | [] | no_license | mhenstell/cb-collect | dceb96062b50e9eecdf85656ae75c3c36a458b86 | e2295ce5c2047d2f9caedfd93e74929ed7c1ff35 | refs/heads/master | 2020-05-17T17:02:52.307848 | 2014-02-28T01:35:45 | 2014-02-28T01:35:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,751 | py | from pycitibike import Citibike
import time
import psycopg2
import sys
import signal
def signal_handler(signal, frame):
print 'You pressed Ctrl+C!'
con.close()
sys.exit(0)
con = None
try:
con = psycopg2.connect(host='localhost', database='citibike', user='citibike', password=sys.arg... | [
"max@kapamaki.net"
] | max@kapamaki.net |
7ac11c9aec24b2e8c50fd89a65f84931e2d16081 | 1cdc31a292e51419988604e0f2284f802c03fc80 | /WSDAN_model/acc.py | e45eeffb0c04e8f9038fd0fb9a292d870379fe68 | [] | no_license | liuhy14/CS231N_project | b27692b9e8c762111d53aed361eeb85e995e4502 | 882d70aba4f507bae653c050d455b41f44bf74b4 | refs/heads/master | 2020-05-22T02:13:36.719970 | 2019-06-05T18:20:32 | 2019-06-05T18:20:32 | 186,194,025 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,530 | py | from dataset import *
from models import *
import torch
from torch.utils.data import DataLoader
import torch.backends.cudnn as cudnn
from utils import accuracy
import torch.nn as nn
import os
import numpy as np
import csv
import pickle
os.environ['CUDA_VISIBLE_DEVICES'] = '0,1,2,3'
data_root = os.path.join('..','..',... | [
"google-dl-platform@googlegroups.com"
] | google-dl-platform@googlegroups.com |
c6be021a4d77d891dc84989797588b97e80fd579 | a230e4c7f4cd862de09201da08babc5e8165052b | /wishlist/migrations/0006_remove_wishlist_price.py | c11c42285c90680222083a72fd58f547b35077c9 | [] | no_license | Code-Institute-Submissions/richard-ui-b_fitness_store_SepResub | c172e7f2fbaee24093168f4c3d7721a29a708392 | 4dbb32c790d0013a07c0912abeed0b9bab3a5571 | refs/heads/master | 2023-08-21T13:16:16.700565 | 2021-09-22T10:47:53 | 2021-09-22T10:47:53 | 409,634,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | # Generated by Django 3.2 on 2021-08-18 11:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wishlist', '0005_auto_20210817_1707'),
]
operations = [
migrations.RemoveField(
model_name='wishlist',
name='price',
)... | [
"richard-jones96@hotmail.co.uk"
] | richard-jones96@hotmail.co.uk |
60b68041d2d0675f6dc9214fa697608944bf01d7 | 125082a3987e95df7eeb0f181dc7125276d761dd | /src/test/javaFileReaderTestPackage/Orange.py | 3ba54aee734c7cf71ad1db7e747b5c648bf2fb42 | [] | no_license | EvanQuan/SENG300G1 | a2568a9d3cbd99e5b006c6a7ae3053f20e9f2af0 | a1328481680bf49b2307296e30c63d3ea898680b | refs/heads/master | 2021-03-19T13:42:38.443321 | 2018-04-30T01:42:17 | 2018-04-30T01:42:17 | 123,995,626 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41 | py | # Test python file
print("Hello world!")
| [
"slchan@XIV.com"
] | slchan@XIV.com |
dbde6670e5fecf5794b21381026175dcc3c768de | ede97a8afbf35b325a0ada346b45566b7b88312d | /app/.~c9_invoke_vwc6aL.py | c5d8e94047bbe69c17fd9f49e86638d6716d73fc | [] | no_license | loni-mitch/Photogram | 2ca2a4cd165dcca4d10159d54c5a448ad057d0da | ecbdc54949a0b04caa990c07f5bdbd356a1b473e | refs/heads/master | 2020-03-14T09:55:46.236533 | 2018-07-18T17:46:48 | 2018-07-18T17:46:48 | 131,555,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,662 | py | """
Flask Documentation: http://flask.pocoo.org/docs/
Jinja2 Documentation: http://jinja.pocoo.org/2/documentation/
Werkzeug Documentation: http://werkzeug.pocoo.org/documentation/
This file creates your application.
"""
import os
from app import app,db,filefolder,token_key
from flask import render_template, r... | [
"tajsivers@live.com"
] | tajsivers@live.com |
76eff1ed6e5549116e7a44b5f0bee37b329388b9 | ab4fd9eed607a25f214d830d12ebc6149b4a7bc4 | /Page1/Euler23.py | daadd0369717292b5bfd9a67051694034e77f6f0 | [] | no_license | lj8175/Euler | 422b31cef99b31030d91f5b49c92016e2a923d2f | 9a48771754fe4af964a5f8384eb65edde238620f | refs/heads/master | 2021-01-23T13:22:38.151411 | 2013-12-24T02:51:06 | 2013-12-24T02:51:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 687 | py | '''
Created on 2013-5-26
@author: lj8175
'''
import math
def listDivisors(x):
ret = []
if x > 1: ret.append(1)
for i in range(2,int(math.sqrt(x))+1):
if x%i == 0:
ret.append(i)
if i != x/i : ret.append(x/i)
return ret
def isAbundant(x):
if sum(li... | [
"lj8175@gmail.com"
] | lj8175@gmail.com |
439d4e0e01a0dbd199dfabeb358cc8ce71c00c81 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Non_Linear_Finite_Element_Analysis_of_Solids_and_Structures_Borst/pyfem-1.0/pyfem/util/kinematics.py | 62c043d65dd3620dc582fc2b0ff225e5bda9f2e4 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 2,178 | py | ############################################################################
# This Python file is part of PyFEM-1.0, released on Aug. 29, 2012. #
# The PyFEM code accompanies the book: #
# #
# 'No... | [
"me@yomama.com"
] | me@yomama.com |
2062ec0c1307e51392ea5eab1970a6f67bf27a58 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02699/s393112489.py | 3018e717e89c8ac744d09ee4877d1e238df00bde | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | nums = [int(e) for e in input().split()]
Sheep = nums[0]
Wolves = nums[1]
if Sheep > Wolves:
print("safe")
else:
print("unsafe") | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
62aeb3577cd61fb36517bd3075a4b2748176647b | 1d3235c4818de4ed5abd683381ccf2768b8cf202 | /examples/qm9/train_qm9.py | a1d28788f92edd4f10bcefede07c712bdaae9038 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | corochann/chainer-chemistry | af9284815b4982123f22f1302ff959fd6577adaa | 8e918e557fe9bce865d9d543ea2864d027827941 | refs/heads/master | 2021-06-01T13:14:08.313857 | 2017-12-01T10:03:04 | 2017-12-01T10:03:04 | 112,725,110 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,749 | py | #!/usr/bin/env python
from __future__ import print_function
import argparse
import os
try:
from sklearn.preprocessing import StandardScaler
except ImportError:
print('You need to install scikit-learn to run this example,'
'please run `pip install -U scikit-learn`')
try:
import matplotlib
ma... | [
"nakago@preferred.jp"
] | nakago@preferred.jp |
0189ddf0d26e6d06e0b79df3d3273c4c0c1f694a | 61f12e69b3d7a11f9e0e6cf9cedb43c9af07c245 | /Demo/Dijkstra's Algorithm.py | d5d67db1c533113b8ba3caf4eddfe0d5c418e877 | [] | no_license | ananabh/Graph_Algorithm | 7bc6c35031fb82638239adb394fa41d27a632e14 | c9d3c4b5ee720701d76d65eace00eeab484d4187 | refs/heads/master | 2021-07-24T13:40:21.312361 | 2020-01-03T10:19:08 | 2020-01-03T10:19:08 | 101,926,480 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,778 | py | import priority_dict
from Adjecency_Matrix import *
def build_distance_table(graph,source):
distance_table = {}
for i in range(graph.numVertices):
distance_table[i] = (None,None)
distance_table[source] = (0, source)
priority_queue = priority_dict.priority_dict()
priority_queue[source] = 0
... | [
"abhianan@users.noreply.github.com"
] | abhianan@users.noreply.github.com |
120095782bf255595410ef8fa35a4d001f991f29 | b4ba59a2fce3a3a69989e5326e437310254f9a51 | /1/day16/json模块.py | f4abcf5ff6999177f9e77c37c21bd7c8d963c0b0 | [] | no_license | tianshang486/python | afaa206067715732ab828aad7f6afc8e9a475268 | 6414390d98dbf9c4428f1f54519f6c134cbd69b9 | refs/heads/master | 2022-08-31T05:49:15.711924 | 2020-05-22T03:08:14 | 2020-05-22T03:08:14 | 265,782,349 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,087 | py | # JavaScript Object Notation:java脚本兑现标记语言
# 已经成为了一种简单的数据交换格式
# 序列化和反序列化:
# 将内存中的数据,转换为字节串,用以保存在文件或通过网络传输,称为序列化过程,反序列化也就是相反在转换回去.
# 序列化:serialization,反序列化:deserialization
# # json 将数据转换为字符串,用于储存或网络传输
import json
# a = json.dumps([1,2,3,])
# print(a,type(a))
# # 元组序列化后,变成列表,但也是字符串
# b = json.dumps((4,5,6))
# pri... | [
"tianshang486@users.noreply.github.com"
] | tianshang486@users.noreply.github.com |
b5449d99fb517d8b9c52684e5f6997cde5af9cda | c7c1830f23d99806c3532b9a929c08ca0736ad58 | /tests/distributions/test_1d_dependencies.py | 22e5547558473d687ada797d9025dbc3d979cfa1 | [
"MIT"
] | permissive | jonathf/chaospy | 8a92df59fd83e39bb64921586e7971c03791eea4 | b5959a24e0bd9b214c292485919d7ce58795f5dc | refs/heads/master | 2023-08-15T16:04:55.764743 | 2023-06-03T11:35:53 | 2023-06-03T11:35:53 | 22,848,758 | 405 | 87 | MIT | 2023-05-18T11:52:46 | 2014-08-11T17:54:25 | Python | UTF-8 | Python | false | false | 2,094 | py | """Test dependent distributions with 1-D components."""
from pytest import raises
import numpy
import chaospy
DIST1 = chaospy.Uniform(1, 2)
DIST2 = chaospy.Gamma(DIST1)
JOINT1 = chaospy.J(DIST1, DIST2)
JOINT2 = chaospy.J(DIST2, DIST1)
def test_1d_stochastic_dependencies():
"""Ensure ``stochastic_dependencies`` b... | [
"noreply@github.com"
] | jonathf.noreply@github.com |
b676b205a6acf36a4e4bf6a4dc8048857dcfd928 | 81cac5d646fc14e52b3941279d59fdd957b10f7e | /homeassistant/components/nest/sensor_sdm.py | a574e92791a4a190e6d2d5a35b3918a851ecf84f | [
"Apache-2.0"
] | permissive | arsaboo/home-assistant | 6b6617f296408a42874a67a71ad9bc6074acd000 | 554e51017e7b1b6949783d9684c4a0e8ca21e466 | refs/heads/dev | 2023-07-27T20:56:52.656891 | 2022-01-19T19:30:57 | 2022-01-19T19:30:57 | 207,046,472 | 2 | 0 | Apache-2.0 | 2019-09-08T01:35:16 | 2019-09-08T01:35:16 | null | UTF-8 | Python | false | false | 3,871 | py | """Support for Google Nest SDM sensors."""
from __future__ import annotations
import logging
from google_nest_sdm.device import Device
from google_nest_sdm.device_traits import HumidityTrait, TemperatureTrait
from google_nest_sdm.exceptions import ApiException
from homeassistant.components.sensor import (
Sensor... | [
"noreply@github.com"
] | arsaboo.noreply@github.com |
963f0a6fa90b3ce87aa8172d17f135d79aa2b0dc | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/request/MybankCreditSceneprodFinanceConsultRequest.py | 5fb1cae90a610a37d48aa1ca0226fff708a1ac50 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 4,009 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MybankCreditSceneprodFinanceConsultModel import MybankCreditSceneprodFinanceConsultModel
class MybankCreditSceneprodFinanceConsultRe... | [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
5d545d7a7feb7adf03ff88f55614ff258a9f8342 | 184f13269249b08e5b62444ece10af8a3a35c9a5 | /stop_starting_start_stopping/json_to_pandas/002_json_to_pandas.py | d99fc291b4c8ed7c70d85051cc1d0ae8a529d7c4 | [
"MIT"
] | permissive | bflaven/BlogArticlesExamples | 3decf588098897b104d429054b8e44efec796557 | aca40bb33f1ad4e140ddd67d6bb39bdd029ef266 | refs/heads/master | 2023-09-04T16:57:57.498673 | 2023-09-01T13:14:12 | 2023-09-01T13:14:12 | 42,390,873 | 9 | 4 | MIT | 2023-03-02T22:39:06 | 2015-09-13T09:48:34 | HTML | UTF-8 | Python | false | false | 796 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
[env]
To activate this environment, use :: conda activate pandas_ga_1
To deactivate an active environment, use :: conda deactivate
# you have created a env with all the required packages
source activate pandas_ga_1
[path]
cd /Users/brunoflaven/Documents/01_work/blog_arti... | [
"bflaven@gmail.com"
] | bflaven@gmail.com |
4ecb5a23d59eb2dd2e99f7d121543dffa0cbe848 | 8a70a0b13083fa1405da0b3c5e1f2a4ea961a0b6 | /tests/unit/states/test_boto_iam_role.py | ea9eca19a406f54653f5985affdf15e3d692ec7e | [
"Apache-2.0"
] | permissive | major0/salt-aws-extension | 2940037302e8bfcb86c1460624154a087248e7f2 | ba3b2456a9829af47e0488157d29fd3188ce12df | refs/heads/master | 2023-04-10T11:53:42.045542 | 2021-03-27T00:39:42 | 2021-03-27T00:49:43 | 351,498,283 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,470 | py | """
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
"""
import salt.states.boto_iam_role as boto_iam_role
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.mock import MagicMock
from tests.support.mock import patch
from tests.support.unit import TestCase
class BotoIAMRoleTestCase(TestC... | [
"major@homeonderanged.org"
] | major@homeonderanged.org |
1b7dda606e204c9adb7afa7747442c587010c773 | b7f1b4df5d350e0edf55521172091c81f02f639e | /ui/display/manager/chromeos/DEPS | 11d4683fe1f5978952f42d107f090539f3546ffe | [
"BSD-3-Clause"
] | permissive | blusno1/chromium-1 | f13b84547474da4d2702341228167328d8cd3083 | 9dd22fe142b48f14765a36f69344ed4dbc289eb3 | refs/heads/master | 2023-05-17T23:50:16.605396 | 2018-01-12T19:39:49 | 2018-01-12T19:39:49 | 117,339,342 | 4 | 2 | NOASSERTION | 2020-07-17T07:35:37 | 2018-01-13T11:48:57 | null | UTF-8 | Python | false | false | 570 | include_rules = [
"+chromeos",
# DeviceDataManager is not created in all environments (such as ash when
# running in mus/mash).
"-ui/events/devices/device_data_manager.h",
]
specific_include_rules = {
"default_touch_transform_setter.cc": [
# DefaultTouchTransformSetter only runs in environments where
... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org | |
b892094c906e669ca13ea77da3f7255061dbb084 | 15fb62305a2fa0146cc84b289642cc01a8407aab | /Python/260-SingleNumberIII.py | 5aa0250e74cf6f16323e8337d59d32df42e14435 | [] | no_license | geniousisme/leetCode | ec9bc91864cbe7520b085bdab0db67539d3627bd | 6e12d67e4ab2d197d588b65c1ddb1f9c52a7e047 | refs/heads/master | 2016-09-09T23:34:03.522079 | 2015-09-23T16:15:05 | 2015-09-23T16:15:05 | 32,052,408 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | class Solution:
# @param {integer[]} nums
# @return {integer[]}
def singleNumber(self, nums):
res_dict = {}
for i in xrange(len(nums)):
if res_dict.get(nums[i]):
del res_dict[nums[i]]
else:
res_dict[nums[i]] = 1
return res_dict.ke... | [
"chia-hao.hsu@aiesec.net"
] | chia-hao.hsu@aiesec.net |
099016f383108c0d3506befd143281fa30515a8e | 89ce4730897195dc99072fb251c94016d27e8538 | /p28.py | afd0e4d7d9db988a0597f51e15416eb43832306a | [] | no_license | paulhunter/ProjectEuler_Python | aba2be51398dc5663ef361cfdd1387aeaf814232 | b70aaac5cd37ff6f112faae874a0e8c91e7f930d | refs/heads/master | 2020-05-30T14:48:49.685036 | 2013-02-25T04:43:36 | 2013-02-25T04:43:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,407 | py |
#Project Euler Problem 28
'''
Starting with the number 1 and moving to the right in a
clockwise direction a 5 by 5 spiral is formed as follows:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
It can be verified that the sum of the numbers on the
diagonals is 101.
What is ... | [
"p.hunter.eng@gmail.com"
] | p.hunter.eng@gmail.com |
42deec200686e5cebbb1212044985190796f824f | a4deea660ea0616f3b5ee0b8bded03373c5bbfa2 | /executale_binaries/register-variants/vpsrld_xmm_xmm_xmm.gen.vex.py | ab8f856bb1af006584b77351f5ffadc8b2fefaf1 | [] | no_license | Vsevolod-Livinskij/x86-64-instruction-summary | 4a43472e26f0e4ec130be9a82f7e3f3c1361ccfd | c276edab1b19e3929efb3ebe7514489f66087764 | refs/heads/master | 2022-02-02T18:11:07.818345 | 2019-01-25T17:19:21 | 2019-01-25T17:19:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | import angr
proj = angr.Project('vpsrld_xmm_xmm_xmm.exe')
print proj.arch
print proj.entry
print proj.filename
irsb = proj.factory.block(proj.entry).vex
irsb.pp() | [
"sdasgup3@illinois.edu"
] | sdasgup3@illinois.edu |
2d70f8ba02da9ab61aabd14e2102db3ec4010d1d | 25ad0b1a056c6fb988fa8c8718bb7cd55388ee5f | /interactions/migrations/0001_initial.py | a00fef0274e5c3249ea75cb5c5fe438d9a63f978 | [
"MIT"
] | permissive | CSI-BennettUniversity/Sample-Project-1 | eeab14a36eeae8d65cdd85efaf54c85732985dcf | 23197352372b7ad00a026683477b5a95a4178e35 | refs/heads/master | 2023-05-13T17:25:26.652317 | 2021-06-05T14:53:15 | 2021-06-05T14:53:15 | 374,136,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,041 | py | # Generated by Django 3.1 on 2020-08-04 08:38
from django.db import migrations, models
import django.db.models.deletion
import interactions.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.Creat... | [
"diptesh.choudhuri@gmail.com"
] | diptesh.choudhuri@gmail.com |
5d8904e9ba7cf7983dfde2e7977062b9ad52108c | 30cc48472cd666467a41565a456e84b4fa7da375 | /mnist/MNIST_data/train-images-idx3-ubyte/train-images-idx3-ubyte/train-images-idx3-ubyte/train-images-idx3-ubyte/test.py | 44d127b0123cb5cceccd6fcd21709ad0992c3016 | [] | no_license | stuian/tensorflow | 0bed07c4ecbd7495081ceed0b6c042803457286d | 4da9762ac09f4772f91ca6e2e356cb505b486b83 | refs/heads/master | 2022-01-22T00:19:38.168252 | 2019-07-26T03:01:21 | 2019-07-26T03:01:21 | 114,263,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | import numpy as np
import struct
import matplotlib.pyplot as plt
filename = 'train-images.idx3-ubyte'
binfile = open(filename , 'rb')
buf = binfile.read()
index = 0
magic, numImages , numRows , numColumns = struct.unpack_from('>IIII' , buf , index)
index += struct.calcsize('>IIII')
im = struct.unpack_from('>784B'... | [
"892545949@qq.com"
] | 892545949@qq.com |
feb157dbafc6815b94d9a8421695893060d6345a | fe09b5107ec3869beed7a6c955beff7b23372f28 | /flowitem.py | 423cbe4486b75dc3932c16e4f25241cfb9f31d71 | [] | no_license | ArnoKasper/ProcessSim | d24bea86a095a774b8510fc8bbb701d37cd2762e | 100c067ddb38f7ae094b8f61a678df81c4372d45 | refs/heads/main | 2023-03-14T13:50:58.371304 | 2021-03-09T14:18:48 | 2021-03-09T14:18:48 | 328,982,762 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,314 | py | """
Project: ProcessSim
Made By: Arno Kasper
Version: 1.0.0
"""
class Order(object):
# __ Set all params related to an instance of an process (order)
def __init__(self, simulation):
"""
object having all attributes of the an flow item
:param simulation: simulation object stored in simul... | [
"61021358+ZanyAK@users.noreply.github.com"
] | 61021358+ZanyAK@users.noreply.github.com |
59a4e0f3a4ab3f6b739ff52fa142fce661828d63 | 2dce494ad49876efcbc2ac08fb4e74d56a524e05 | /models/networks.py | c2b1717aba42ef737b1f7aad5fb409f1dacd759e | [] | no_license | Chilie/HDC2021_code | c06f2c4d024ccd08d93271893c4e87a1f9086a54 | 72482ed6037feacc45683f5e83267ce11c2697d8 | refs/heads/main | 2023-09-01T03:57:37.726998 | 2021-09-29T15:11:59 | 2021-09-29T15:11:59 | 410,872,698 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,761 | py | import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.autograd import Variable
import numpy as np
from models.fpn_mobilenet import FPNMobileNet
from models.fpn_inception import FPNInception
from models.fpn_inception_cconditionalsr import FPNInceptionCCSR
from models.fpn_inception_simp... | [
"matliji@nus.edu.sg"
] | matliji@nus.edu.sg |
fa802519ff310cbc0067f8afe4833b3721023352 | c18780e8d58422ad2d63515484101f227d30a8e8 | /tools/c7n_policystream/setup.py | fa8d0fc26246a52c76e428ff14f5ec60583525f0 | [
"Apache-2.0"
] | permissive | stefangordon/cloud-custodian | 18dc02d5f605b4896d745e51d7005055e595e45a | 099d9c03f787b43c97e2acb9bbf97bc5a092b644 | refs/heads/master | 2021-07-14T14:21:38.529152 | 2021-02-16T15:22:38 | 2021-02-16T15:22:38 | 125,872,127 | 0 | 0 | Apache-2.0 | 2020-05-25T13:49:14 | 2018-03-19T14:37:36 | Python | UTF-8 | Python | false | false | 5,399 | py | # Automatically generated from poetry/pyproject.toml
# flake8: noqa
# -*- coding: utf-8 -*-
from setuptools import setup
modules = \
['policystream']
install_requires = \
['argcomplete (>=1.12.2,<2.0.0)',
'attrs (>=20.3.0,<21.0.0)',
'boto3 (>=1.17.5,<2.0.0)',
'boto3>=1.12.0,<2.0.0',
'botocore (>=1.20.5,<2.0.0)',
... | [
"noreply@github.com"
] | stefangordon.noreply@github.com |
c59a9e19a3ac0d9385b405c97d8d7785de977646 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03284/s851420398.py | cab7da04f619aeda933ba8430cc5633f70494311 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | n, k = map(int, input().split())
h = [0]*k
while True:
for j in range(k):
h[j] += 1
n -= 1
if n <= 0:
print(max(h) - min(h))
exit()
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d682999bd96d9638a182f78f631d75cb4acf4bbd | b4e704f67214028cd0ba8b7a641a2267faf606e4 | /projectmf/functional_tests/fulldayofeating/test_calculate_full_day_of_eating_without_ingredient.py | 5eb64f17f3655f768d4b3d1a671fb416382b07d2 | [] | no_license | matthias4366/mf-2 | d21b32aae9ae617d78b4b1541edc196f6f822e4e | 73e2110c031c8c17596e27af1143b557b1062b3c | refs/heads/master | 2022-10-23T05:54:32.889983 | 2020-06-11T15:40:04 | 2020-06-11T15:40:04 | 190,999,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,847 | py | from selenium.webdriver.support.ui import Select
from functional_tests.utils.click_navbar_item import \
click_navbar_item
from ..base import FunctionalTestWithUserLoggedIn
from selenium.webdriver.common.keys import Keys
import time
from measuredfood.models import (
FullDayOfEating,
NutrientProfile,
)
import... | [
"spam.matthias.h.schulz@gmail.com"
] | spam.matthias.h.schulz@gmail.com |
f2d230e0ae384792d15e162bc278f5e4f24b7a82 | faf2d6fd277ef996359e0841dc77c440152c21eb | /main1.py | c0f3cc23ae68382bd71eb9753d8713ca94867b8b | [] | no_license | Nithinpadmaprabhu/Air-Quality | cf41340d9797e413c1c900199e99c5df43b282df | 674afcc5ea3a01b69b6b77d1d5e7e1eb0c621764 | refs/heads/master | 2021-03-26T15:59:42.724411 | 2020-03-16T14:22:13 | 2020-03-16T14:22:13 | 247,720,263 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,552 | py | #!/usr/bin/python3
'''
Created on 01 October 2017
@author: Yahya Almardeny
This is the main entry point to the program
The Flow of this program goes here
'''
import time as t , socket, os, datetime
from mq import MQ
from mcp3008 import MCP3008
from point import Point
from groveO2 import Grove_O2
from soundDetector ... | [
"npadmaprabhu@tssg.org"
] | npadmaprabhu@tssg.org |
54efbe8f8beeb4862f01be570c1ab80e8425d577 | d66818f4b951943553826a5f64413e90120e1fae | /hackerrank/Python/Validating Credit Card Numbers/solution.py | 84526230cfaed162d112747247d775c3adf85975 | [
"MIT"
] | permissive | HBinhCT/Q-project | 0f80cd15c9945c43e2e17072416ddb6e4745e7fa | 19923cbaa3c83c670527899ece5c3ad31bcebe65 | refs/heads/master | 2023-08-30T08:59:16.006567 | 2023-08-29T15:30:21 | 2023-08-29T15:30:21 | 247,630,603 | 8 | 1 | MIT | 2020-07-22T01:20:23 | 2020-03-16T06:48:02 | Python | UTF-8 | Python | false | false | 233 | py | import re
for _ in range(int(input())):
s = input().strip()
if re.match(r'^[456](\d{15}|\d{3}(-\d{4}){3})$', s) and not re.search(r'(\d)\1\1\1', s.replace('-', '')):
print('Valid')
else:
print('Invalid')
| [
"hbinhct@gmail.com"
] | hbinhct@gmail.com |
c87b761f3286e13710b7d0867cbfa6847bae3448 | 6b0b119709ea55a06aa982bb022fc96d85c0cd68 | /ex_4_2.py | c4c2f537ef7535828e929f21eb7e7d3c81cf3884 | [] | no_license | VincentLu91/Python | 878ebaf1ed845463c6acc9997be5a36d25edfb2d | 27dcf28c0e5b0c5d16132b9a38acfea3828fdf4c | refs/heads/master | 2020-06-01T07:00:27.772672 | 2014-11-17T19:54:20 | 2014-11-17T19:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | '''
Ask the user to type something (use raw_input). To find out whether the input
was a number, compare whether the input is after "0" and before ":" in
alphabetical order. If it is a number convert it into an integer. Then print
the input and its type. (Note: this won't work if the user enters a real
number.)
'''
n = ... | [
"vincentlu@hotmail.ca"
] | vincentlu@hotmail.ca |
b9c170fac8be79c709b437a07518b7f7c61d83c9 | cdd6c79dc5d42af57dc305c45f6d773383a9b433 | /weather/migrations/0001_initial.py | 219e63f83774f072cdd214131d944e84b0a897f8 | [] | no_license | ins099/weatherapp | 021c14a71daf9e4499be17eabf7a385158744a65 | ca11e8ab7ade6017ce2b91657d40eeda3141bc62 | refs/heads/master | 2022-12-21T11:22:36.720534 | 2020-09-22T18:24:47 | 2020-09-22T18:24:47 | 297,736,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | # Generated by Django 3.1.1 on 2020-09-22 15:54
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='City',
fields=[
('id', models.AutoField(aut... | [
"alaminsaram92@gmail.com"
] | alaminsaram92@gmail.com |
ce2c657ba2500a9211c7b986a84657c4bcb1bc17 | f70fd4b12df2d4456a0353c8b43d48f52441d204 | /apps/users/adminx.py | d19cc196af3ec8d246fdd1ddc52d1eef2e347daf | [] | no_license | gauravjha111/Online-Learning-Platform-based-on-Django-Admin | 698cac2cc8f0852f046060e800985a3125abf160 | b22dccf9536ecd21283e1f6b6d0ee6360b6c09fc | refs/heads/master | 2021-08-07T04:59:42.938019 | 2017-11-07T15:36:08 | 2017-11-07T15:36:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,251 | py | # _*_ coding: utf-8 _*_
__author__ = 'Yujia Lian'
__date__ = '6/6/17 1:52 AM'
import xadmin
from .models import EmailVerifyRecord, Banner, UserProfile
from xadmin import views
from xadmin.layout import Fieldset, Main, Side, Row
from xadmin.plugins.auth import UserAdmin
class BaseSetting(object):
enable_themes = Tr... | [
"yujia.lian001@gmail.com"
] | yujia.lian001@gmail.com |
1c85c1d3be0dee8a1f0ef5c6fa751e8de61604ad | 17a6a8e37dfb3ab1121009c8cf77c0d4d2454d4b | /news_crawler/modules/clean_text.py | 716d5e4f62d53af6b5aa08c027386362f58050fe | [] | no_license | andymithamclarke/fashionjoblosses | 2c0031e3ba865b4e13196c43ca55f0865b908924 | dbad52fd6820a777ff4485a833f011969c53a4bf | refs/heads/master | 2023-04-14T14:11:36.889824 | 2020-10-29T15:19:34 | 2020-10-29T15:19:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | # =========================
# Clean the scraped text of irregularities
# =========================
# Irregularities found:
# - '\n' can appear within the body of the text
# - <p> elements can be too short and thus useless
# Solutions implemented:
# - Returning the <p> element only if it's str(length) is greate... | [
"andrewjhclarke@gmail.com"
] | andrewjhclarke@gmail.com |
300c776ef0c3046017fa26b509976d23f5146208 | 226e283c7a367e61a55cd9cc6d2549409522756d | /Manuel_upper/Board.py | 0aae053e21ce884612b2cbfe7350660e753a4434 | [] | no_license | diontran/GameSearchROPASCI360 | fe2454d1b55736494739b307b3410a8f3b87cacd | c6cf333dd72c3e746eff7b376d577eab53f29a9a | refs/heads/main | 2023-05-13T16:59:25.785871 | 2021-06-02T17:33:45 | 2021-06-02T17:33:45 | 373,251,997 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,672 | py | import itertools
class Board:
"""A class representing the board to the player, providing information for the player to make a decision"""
def __init__(self, player_type):
self.player_type = player_type
self.game_state = {'R':[], 'P':[], 'S':[], 'r':[], 'p':[], 's':[]}
#A list of list of h... | [
"dion.doanh.tran@gmail.com"
] | dion.doanh.tran@gmail.com |
e5d651724d5f41ceac086f9d0da8f159b38821bf | a572103139a007d45f27ba9f86a174537f5725ae | /blog/urls.py | d69766315002496350281a4f7d3b6533ce9e53eb | [] | no_license | VitoCorleonexin/Blog | f406d31a9f4fdbadd2a8819615996e3f3d6d7b6e | 5336711abe63a1a4982e9e33f237e9d59588eae9 | refs/heads/master | 2022-04-20T07:47:55.319747 | 2020-04-22T16:05:36 | 2020-04-22T16:05:36 | 256,343,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 611 | py | from django.urls import path
from . import views
app_name = 'blog'
urlpatterns = [
path('',views.PostListView.as_view(), name='blog-home'),
path('about/',views.about, name='blog-about'),
path('post/<int:pk>/',views.PostDetailView.as_view(), name='post-detail'),
path('post/new/',views.PostCreateView.a... | [
"wangwenxin03@sina.com"
] | wangwenxin03@sina.com |
ad3a2801016e2887d1a8afbfb79b40f4b67fd555 | 9f1e45b3deb43eb971ce5872eb832fef56672d20 | /__init__.py | c7a258bfb60d7be0a842f236558ce0add704368d | [
"BSD-3-Clause"
] | permissive | fhLUG/limnoria-mittag.at | b8825301c3503a68cf8dbabc97f01efe2878b9d6 | 2dd20e58d56e762e3eae47c9745ea7f9838d86e7 | refs/heads/master | 2020-06-25T13:14:04.681377 | 2016-07-30T13:28:21 | 2016-09-22T15:54:26 | 67,422,238 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,577 | py | ###
# Copyright (c) 2016, fhLUG
# 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 list of conditions, and th... | [
"knittl89+git@googlemail.com"
] | knittl89+git@googlemail.com |
61b0d22c7fff82918f2b874d0859a21b34fbdb70 | 426e7709cf8ac82fc928a489f52cad1a17019a5d | /OOP/math_dojo.py | 49737d89234c919a70f6dc444b57ab30cb235722 | [
"MIT"
] | permissive | gfhuertac/coding_dojo_python | 3eb3fa98175e7d55f5d2510355f932342649fc25 | 4d17bb63fb2b9669216a0f60326d4a4b9055af7e | refs/heads/master | 2022-05-09T21:51:37.534322 | 2020-06-06T21:28:52 | 2020-06-06T21:28:52 | 229,930,788 | 0 | 0 | MIT | 2022-04-22T23:15:54 | 2019-12-24T11:37:27 | Python | UTF-8 | Python | false | false | 788 | py | import unittest
from functools import reduce
class MathDojo:
def __init__(self):
self.result = 0
def add(self, num, *nums):
self.result += num + reduce(lambda x,y: x+y, nums, 0)
return self
def subtract(self, num, *nums):
self.result -= num + reduce(lambda x,y: x+y, nums, ... | [
"gonzalo@huerta.cl"
] | gonzalo@huerta.cl |
cc4a079b90a29d40b63d8616277c45c31f14704d | cc03e0d7ceb6ca5e37c239a5c354cad36c78ade6 | /urban/urban/settings.py | a88876ae562b71fce74454b6ca279c39313c8e82 | [] | no_license | randypantinople/Analysis-of-Starbucks-Global-Presence | 87235315e048baea7f0ead7f1ddfa48ecd915c38 | 5516ae5095bf07d2936c57da0704ae3af0a0bfc8 | refs/heads/master | 2022-11-26T09:31:03.309927 | 2020-08-01T16:23:05 | 2020-08-01T16:23:05 | 281,262,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,135 | py | # Scrapy settings for urban 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/downloader-middleware.h... | [
"randypantinople@yahoo.com"
] | randypantinople@yahoo.com |
5ce94942c2232ed793c891c895905868df103abb | 580d6acdbb6dc3d6d27cb164097731fa601de292 | /ECS655U_VENV_P3/bin/jupyter-run | 134c4b6eed9c33a3c1cbb504758780012f85651d | [] | no_license | johnsn27/security_engineering | 182418530bdf3c1c3927dfcad686e7bbe9bbfc9f | 996341864a5e2a8e7bd7ea24b05fdeca7e3f7938 | refs/heads/main | 2023-03-02T18:59:15.608520 | 2021-02-13T19:52:34 | 2021-02-13T19:52:34 | 338,605,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 301 | #!/Users/johnsn27/Documents/Uni/security_engineering/ECS655U_VENV_P3/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from jupyter_client.runapp import RunApp
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(RunApp.launch_instance())
| [
"nathan.johnson@bbc.co.uk"
] | nathan.johnson@bbc.co.uk | |
9086642ccad8678a2bfbd13c03b645bdc7cd6bcc | 10a4151ad6143d75a000b2c71957e2b698f704fa | /2920.py | e014cbe94c61fd34a28b2ec8db16a45cf0dfb052 | [] | no_license | Yabby1997/Baekjoon-Online-Judge | 2f811507be6d725bfcf33c1e1dd2ccbf052fba47 | 3aa74d89f8accc98fbcdba1bf705d5291a80178c | refs/heads/master | 2021-12-30T02:53:56.897972 | 2021-12-26T07:18:46 | 2021-12-26T07:18:46 | 231,369,092 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 563 | py | melodyList = list(map(int, input().split()))
melodyCheck = [0]*7
output = 0
for i in range(len(melodyList)-1): #LEN FUNCTION RETURNS LENGTH OF LIST
melodyCheck[i] = melodyList[i+1]-melodyList[i]
for i in range(len(melodyCheck)-1):
if melodyCheck[i] == melodyCheck[i+1]:
output ... | [
"yabby1997@gmail.com"
] | yabby1997@gmail.com |
87d3f98dcf7aebf0fbec3905291a13e56a4136f2 | 661aad54c4ea654b197d0fdff3e18e3aa0056661 | /constants.py | 80453ccde24a468b2fb3a17da51d161d9a5a79a8 | [] | no_license | mohit89mohit/instabot | 0a884d523ca96c35f011eebdc0b082133b95dc58 | 9221185e14cc5b6ba76a2acc40916802d108fef1 | refs/heads/master | 2020-06-24T07:02:39.766014 | 2017-07-11T18:49:53 | 2017-07-11T18:49:53 | 96,926,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | # global variables file
# instagram API access token
APP_ACCESS_TOKEN = '2288274672.6d26f8c.5209938e17cd40619b178ddc37793f48'
# instagram API base url
BASE_URL = 'https://api.instagram.com/v1/'
| [
"mohitchambial89mohit@gmail.com"
] | mohitchambial89mohit@gmail.com |
594a55f3e4d5cd1c2c14230e6bd967f1d7b7f5d8 | 61febabc6aa34b7c47208aa7be5dfca88287ddaf | /Ch. 7 User Input and while Loops/Deli.py | ef00a69b390ec09c873760b47c3a2dd13dd6aa42 | [] | no_license | chrisstophere/Python-Crash-Course | 4be7262acc2ff8ad26d99aceb028c25e4c7f9b0b | 702c44734e93df68ec55831626fb7a7a22ce2b8d | refs/heads/master | 2021-05-24T10:31:54.679224 | 2020-05-07T21:10:09 | 2020-05-07T21:10:09 | 253,520,738 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | sandwich_orders = ['ham', 'roast beef', 'turkey']
finished_sandwiches = []
while sandwich_orders:
sandwich = sandwich_orders.pop()
print(f"I made your {sandwich.title()}.")
finished_sandwiches.append(sandwich)
print("\n")
for sandwich in finished_sandwiches:
print(f"I have made your {sandwich} sandwic... | [
"chris@ewentech.com"
] | chris@ewentech.com |
95cdcd2931a7898d7fc1fcb55a5ae3669b6636f8 | ddbac0c502110680e0d48974bb55c2032962f4a7 | /password_test.py | 2d1eb5418c4b6809938dd5e838869992fb3d527a | [
"MIT"
] | permissive | NinahMo/password-locker | 97a1b34488e56b8d8fab3a38965c6cac0f041ef4 | 4c8a9ad740e95da8cccfe82bbbaefdcce753728f | refs/heads/master | 2022-11-11T12:40:43.552476 | 2020-06-29T12:20:45 | 2020-06-29T12:20:45 | 275,170,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,535 | py | import unittest
from password import Password
class TestUser(unittest.TestCase):
def setUp(self):
self.new_password = Password("Ninahmozzy","0712345678","aBcDeF","aBcDeF")
def tearDown(self):
Password.password_list = []
def test_init(self):
self.assertEqual(self.new_password... | [
"ninahb746@gmail.com"
] | ninahb746@gmail.com |
db32be82e4cbb8041e41a5706bfdb1e999fedfae | 6b065c0e4e2d103f37b5d7ac062c8f778cc7b960 | /set-01/length.py | 47eaf20923af1513b3f035ea1bf38fe31157f74d | [] | no_license | abhi1615/GUVI | 3033dd953175976431a10f86384c489ee683c0d1 | 6563279d7cfd293962e863f42dded676e0a7cbf5 | refs/heads/master | 2020-03-31T09:48:18.645870 | 2019-01-19T14:20:44 | 2019-01-19T14:20:44 | 152,111,496 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 108 | py | def len():
n=int(input())
c=0
while n>0:
c+=1
n//=10
print(c)
len() | [
"noreply@github.com"
] | abhi1615.noreply@github.com |
a57e9b2e13acb81a055216ed04bc58da919abdcd | e568e1fc751d16b739c16d6d396f18ca5c520be2 | /microblog/app/__init__.py | 1ef6a54dfa8255ec1ac774ab2bd04a5d89711899 | [] | no_license | KennF/Timeline | 3a76dd38a7dc9e174265932d33202e7e981d5a65 | c4faa4d7ab8d2d6cda81226678a7bd669e4efcaf | refs/heads/master | 2021-01-10T16:49:09.748686 | 2013-09-04T10:34:31 | 2013-09-04T10:34:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,277 | py | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.openid import OpenID
from config import basedir, ADMINS, MAIL_SERVER, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD
app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)... | [
"cactus.fxy@gmail.com"
] | cactus.fxy@gmail.com |
bba7c9430acdb73d6eda2a0982f190538c19e509 | 6c671228ff9e08cbdbd58eba7938bc363cc7d55a | /infrastructure/serializers/__init__.py | 7f944e47bf94bc82b63ee4b7ac9c87fddb13671b | [
"MIT"
] | permissive | joaquinquintas/shipwell_backend_ricardo | a9ee69ec48ecdb09a4748d30d319d1a2ecfe948d | 55de24c8c7e3a685a1dca786e5c026410d353473 | refs/heads/master | 2020-07-27T04:47:22.679327 | 2019-09-16T18:53:46 | 2019-09-16T18:53:46 | 208,873,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 383 | py | '''
serializer package
'''
from .dict_serializer import DictSerializer
from .average_temperature_serializer import AverageTemperatureSerializer
from .temperature_serializer import TemperatureSerializer
from .validation_error_serializer import ValidationErrorSerializer
__all__ = [
'AverageTemperatureSerializer',
... | [
"ricardosiri68@gmail.com"
] | ricardosiri68@gmail.com |
006672a2ef6b5dce7819eac585bedfefdbb99216 | 7bf756218bacb058a10e81964a5b9722dd8a82c2 | /rentspace/apps/userprofile/views/admin_restapi.py | 30421afa3234920a6ba9eac75862911de2cb73db | [] | no_license | saikumar-divvela/rentspace | a30f3450d545718893a93cfd4f333c7dce441c29 | 81065e27d4b1b3c6d1ffdadb7e1948592f21932e | refs/heads/master | 2021-06-17T13:59:41.376526 | 2017-05-24T07:55:37 | 2017-05-24T07:55:37 | 57,314,062 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,444 | py |
from django.http import HttpResponse
from django.http import Http404
from rest_framework import status
from userprofile.models import User
from userprofile.serializers import UserSerializer
class JSONResponse(HttpResponse):
"""
An HttpResponse that renders its content into JSON.
"""
def __init__(self,... | [
"saikumar.divvela@gmail.com"
] | saikumar.divvela@gmail.com |
a790c33ec9c44720c105c842259b2b07a70bb80d | 95d73f1daebb98fe6707b999c9763f3b84d418a4 | /cms/plugin_pool.py | 2ba37a444175b8cab1731ac1a6ac72031895f547 | [] | no_license | leotop/django_ukrhim | 8e01e284076878c7691986d5e8d056795d2bb900 | e5a60a79f441ae732350e518f9b71e2724dc010a | refs/heads/master | 2021-01-22T15:51:27.617651 | 2015-01-23T11:00:37 | 2015-01-23T11:00:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,063 | py | # -*- coding: utf-8 -*-
from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered
from cms.plugin_base import CMSPluginBase
from cms.utils.django_load import load
from cms.utils.helpers import reversion_register
from cms.utils.placeholder import get_placeholder_conf
from django.conf import settings
... | [
"root@ip-172-31-19-251.us-west-2.compute.internal"
] | root@ip-172-31-19-251.us-west-2.compute.internal |
0dfc17422b802593624f2382527227749645fa83 | 5a411f275eaf9d177bdae83c2c06990dcdff3e1e | /mm.py | e5a2c8b518855246b960d10cc8fc8f2e33e20b71 | [] | no_license | jimmy1231/mental-math | 9f91e6b08931dcdb7752535695939ad907d551dc | 9c92af42890f466cfdaf97390e7e832d99f22822 | refs/heads/master | 2021-03-02T10:47:13.502317 | 2020-03-08T18:02:15 | 2020-03-08T18:02:15 | 245,862,312 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,027 | py | import pyttsx3
import random
import math
if __name__ == "__main__":
ops = ['+', '-', '*', '/'];
engine = pyttsx3.init()
engine.setProperty('volume', 1.0)
engine.setProperty('rate', 130)
eval = random.randint(0, 20)
print('Start with {}'.format(eval))
engine.say('Start with {}'.format(eval))
engine.runAndWait... | [
"dfjimmy.li@gmail.com"
] | dfjimmy.li@gmail.com |
2a8416de77ac7dd2c7768c9e83a912883f727d7f | 05b1db9381b60f58f7372b0cb7977dc7bf700358 | /sec6_lec_66_filehandling_loops_func_cond.py | 318048abad7d83243b59c70ceaf140a3d24bf6ee | [] | no_license | tgolf4fun/the_python_mega_course | 0b1d8370dacadfc92963dd2bf16b6b54ec4fc745 | 23c8519fcbd9a973bd69ac45acfb98ea56ab4388 | refs/heads/master | 2021-08-17T10:17:51.995596 | 2017-11-21T04:08:13 | 2017-11-21T04:08:13 | 108,569,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py |
temperatures = [10, -20, -289, 100]
def writer(temperatures):
with open("files/sec6lec66.txt", "w") as file:
for t in temperatures:
if t > -273.15:
t = t*9/5 + 32
file.write(str(t) + "\n")
writer(temperatures) | [
"tgolf4fun@gmail.com"
] | tgolf4fun@gmail.com |
5acee9d5a274bab67816f86b40e55547c4a86bd9 | 479bb9dbed79a8e3756a52d05ab74d3001a13110 | /ex6.py | 468ad17f638defa555b5019b9203ab9ea19d5f02 | [] | no_license | DavidLohrentz/LearnPy3HardWay | 49c1c8f130df916ca369449851db7a0bd5dcae5a | 39ef557b9ba6f9b82defd474659eecf27441b0e1 | refs/heads/master | 2021-09-05T06:28:49.373804 | 2018-01-24T20:17:56 | 2018-01-24T20:17:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,141 | py | print()
print()
# define types_of_people
types_of_people = "1,000,000"
# define x with formatted string containing variable above
x = f"There are {types_of_people} types of people."
print("<<<<<<< x after assigning value", x)
# define binary
binary = "binary"
# define do_not
do_not = "refuse to self-flaggelat... | [
"noreply@github.com"
] | DavidLohrentz.noreply@github.com |
d6fd438475d5a3584caedb9bb0912b0d23438de0 | 7935b04458783507cc83bbed73140aae4c826f58 | /docxtemplater/xml_helper.py | 3270f56d85cd0df4ef8ba8d8c00ce9f4036f74ae | [] | no_license | nikhildamle/docx-templater | c164f64e6ce04b58202897eba119866584b89acf | bd7b2f654fd3976551f7bfe37875afc862893db9 | refs/heads/master | 2021-01-10T20:06:27.986756 | 2015-09-13T07:50:23 | 2015-09-13T07:50:23 | 42,385,402 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,294 | py | from xml.dom.minidom import Node, Element
def get_text(node: Element):
text = None
for child in node.childNodes:
if child.nodeType == Node.TEXT_NODE:
if text is None: text = ''
text += child.nodeValue
return text
def set_text(node: Element, text):
dom = node.ownerDocu... | [
"nikhilbcd@gmail.com"
] | nikhilbcd@gmail.com |
90c39d6e77cf38bb10df1f74b31b59ebf3379d89 | 97bc215350175b6322afe94e22a468d7b522352c | /GrackleHeatingCloud_0.01/Plots/scripts/temperature_timeseries.py | fb0a1a3916c47c25c31fddcb2102c60ffc12be23 | [] | no_license | rickyfernandez/enzo_runs | 5e57baea83682237dfb13e081c6eb277cc22f397 | 62f0f914513426610aadf7b372e1a7615212ec87 | refs/heads/master | 2021-01-19T01:06:04.316227 | 2016-09-01T18:49:41 | 2016-09-01T18:49:41 | 41,223,407 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | import yt
import os
import numpy as np
import matplotlib.pyplot as plt
pc_to_cm = 3.0857E18 # 1pc in cm
plot_range = range(0,12,2)
plot_range.append(11)
num_plots = len(plot_range)
colormap = plt.cm.gist_ncar
plt.gca().set_color_cycle([colormap(i) for i in np.linspace(0,0.9, num_plots)])
file_names = []
for i in pl... | [
"rafernandezjr@gmail.com"
] | rafernandezjr@gmail.com |
a4c2fdcc6b5ae2ee1d96826b298814f675fbe913 | 796e17c8b983281f8ff24abc37a7ecb173ad6acd | /tests/examples/agnostic-examples/h_cost_functions/SConstruct | 239c437fed168901a8c39630ed8b70e72c6009c2 | [
"MIT"
] | permissive | anubhav-cs/LAPKT-public | d556783d1fc7f9b9a7f9d0b88a4a95ffdebcd2e6 | 87407cf6995baa50b54f63eb0c3de4e724dd23cb | refs/heads/master | 2023-07-19T09:39:22.125096 | 2022-10-12T10:48:20 | 2022-10-12T10:48:20 | 456,788,199 | 1 | 1 | null | 2022-02-08T04:56:00 | 2022-02-08T04:55:59 | null | UTF-8 | Python | false | false | 1,229 | import os
debug = ARGUMENTS.get('debug', 0)
common_env = Environment()
include_paths = ['../../../include', '../../../interfaces/agnostic', '../..' ]
lib_paths = [ ]
libs = [ ]
common_env.Append( CPPPATH = [ os.path.abspath(p) for p in include_paths ] )
if int(debug) == 1 :
common_env.Append( CCFLAGS... | [
"anubhav.singh.eng@gmail.com"
] | anubhav.singh.eng@gmail.com | |
28b4bb1bb6be3fc429a488b7d4d0e9130a698355 | 8dd519098e0066a985d654576c5350280e5a9042 | /master/Chapter08/07_dqn_distrib_plots.py | d215acd77ca1b93f054074481f32631c79cfbd6b | [] | no_license | mecha2k/rl_handson | 491f0dfb161d0d968eb2941ade9de1c33addb282 | b6f025e1cca07cfddc6eb5c4b78dc2c7a3b6071a | refs/heads/master | 2023-03-22T05:49:19.932512 | 2021-03-15T22:49:33 | 2021-03-15T22:49:33 | 330,268,772 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,374 | py | #!/usr/bin/env python3
import gym
import ptan
import ptan.ignite as ptan_ignite
from datetime import datetime, timedelta
import argparse
import random
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from ignite.engine import Engine
from ignite.metrics ... | [
"mecha2k@naver.com"
] | mecha2k@naver.com |
72d60ae0420addea5f29714026881b3dbb90d936 | 51965a7eaa6891151274f0659402f0106f5045cb | /01-headers.py | 5c4ae6e1d7d955b21fe08f96a435392c66627853 | [] | no_license | Susielove/MySpider | 246b699533678004f9ce62ba6e1b30bfd994ed13 | 091f14fed755446634fd4603ef25d65a5edf4dc7 | refs/heads/master | 2020-04-10T05:03:15.224090 | 2019-01-05T14:18:33 | 2019-01-05T14:18:33 | 160,816,339 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | import requests
headers ={"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"}
response = requests.get("http://www.baidu.com",headers=headers)
b = response.content.decode()
print(b) | [
"44665170+Susielove@users.noreply.github.com"
] | 44665170+Susielove@users.noreply.github.com |
c2e7fe9e5e348b121084739d363788f95d4b4160 | 4f2cdd9a34fce873ff5995436edf403b38fb2ea5 | /Data-Structures/List/Part2/P015.py | 9bbc2f8f0beb4506bc15ef903c2418a9aa774178 | [] | no_license | sanjeevseera/Python-Practice | 001068e9cd144c52f403a026e26e9942b56848b0 | 5ad502c0117582d5e3abd434a169d23c22ef8419 | refs/heads/master | 2021-12-11T17:24:21.136652 | 2021-08-17T10:25:01 | 2021-08-17T10:25:01 | 153,397,297 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | """
Write a Python program to get the frequency of the elements in a list
"""
import collections
my_list = [10,10,10,10,20,20,20,20,40,40,50,50,30]
print("Original List : ",my_list)
ctr = collections.Counter(my_list)
print("Frequency of the elements in the List : ",ctr) | [
"seerasanjeev@gmail.com"
] | seerasanjeev@gmail.com |
ee5ad823b9c373e0a19790607fc0fe2e979a1d71 | 03a91e45aaa056d45d6b613c826aca4a4da12edf | /Lists.py | f7ad3467afb52c193d279bd8ccfbc02826a533b2 | [] | no_license | Anoosha-Shetty/Learn-Python | deb785a3557e364b505a6f6f584f7c0340556d16 | 9c733004c560225bb6d80aae60cf565e408161c0 | refs/heads/master | 2021-01-17T05:21:40.341096 | 2017-03-22T23:01:12 | 2017-03-22T23:01:12 | 61,144,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,232 | py | fruits = ["Apple", "Banana", "Orange"]
print("fruits[0]: " , fruits[0])
print("fruits[1]: " , fruits[1])
print("fruits[2]: " , fruits[2])
print("Length of the list: " , len(fruits))
for i in range(len(fruits)):
pos = i + 1
pos = str(pos)
fruits[i] = pos + "." + " " + fruits[i] + "**"
print(fruits)
... | [
"noreply@github.com"
] | Anoosha-Shetty.noreply@github.com |
44d5e9f7235af8fbb5cbafc29da89178edc03e76 | 9c2957e9e5c456c36cc1f4e15cbc8e97c1035830 | /Chapters 1-11/Chapter 5/checking_usernames.py | 15a32fd66f73f804987fbe1fdd6575acd3975906 | [] | no_license | beardedsamwise/Python-Crash-Course | fa88e846026d234011f44e2488b94c67116560ef | 6e64e9b1cd5675ef62048446188cfde5d0799f28 | refs/heads/master | 2020-04-30T19:11:47.791817 | 2019-06-23T23:45:02 | 2019-06-23T23:45:02 | 177,031,562 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | current_users = ['peter','alex','john','steve','dave']
new_users = ['Ralph','Alex','Michael','Stewart','Reginald']
#finish this off
current_users_lower = []
for users in current_users:
current_users_lower.append(users.lower())
for new_user in new_users:
if new_user.lower() in current_users_lower:
print("This us... | [
"samjamesbentley@gmail.com"
] | samjamesbentley@gmail.com |
46af2291173cadcb72ea56fa2c5ab0fd636c8a92 | 233eeb7ea61ff92c1a2230792a761626256805ba | /serializers/JsonSerializer.py | 068997afff5052250bf4d967c20c9cdc640b2292 | [] | no_license | PowerOfDark/micro_tcp | 6651984879352510a24d85d169901ec689c84801 | f28ccb5378b03b2d77ff7443b0de7c2089cb20b0 | refs/heads/master | 2020-09-21T05:47:43.223863 | 2019-11-28T18:55:53 | 2019-11-28T18:55:53 | 224,699,462 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 289 | py | import json
from serializers.Serializer import Serializer
class JsonSerializer(Serializer):
def __init__(self):
super().__init__()
def serialize(self, payload):
return json.dumps(payload)
def deserialize(self, payload):
return json.loads(payload)
| [
"przem2003@o2.pl"
] | przem2003@o2.pl |
bcefaa1d1848f6a61eba54b36b4a2f7e18e44c95 | e0bd2e00cbdfb758872a2603b0ccf68d4c882309 | /vid_addons/l10n_in_dealers_discount/l10n_in_dealers_discount.py | 828f1a1aaf7bd16b63ef73d61926d3f0fa379a2b | [] | no_license | vineeth993/NiceBackUp | 58fdc5cc11df50ec5baf20bce2806e1a5b617475 | 303e26a9b7e4e731ba13033cd15e754578dfab08 | refs/heads/master | 2021-07-16T23:12:22.909970 | 2021-06-19T09:20:28 | 2021-06-19T09:20:28 | 111,262,234 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 9,639 | py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2013 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | [
"vineeth@vidts.in"
] | vineeth@vidts.in |
532a4bf5539dd341150d7a4edec95945232e13fe | 4b447c626792d9d38de26bcfcc1ad29de77c4b4f | /run_cross_domain_disen_sGRL_NoAE_cyc.py | b18d35507a0927e335e49acbf50f23bf5206af3f | [
"MIT"
] | permissive | jordi-bird/cross-domain-disen | d8408dfb0cd6db0c7e5afadd669a72af48a734c6 | f49422d2defde5e1c88ea5bb7d2989b87fd49ce5 | refs/heads/master | 2020-04-23T23:50:32.100687 | 2019-05-08T13:28:24 | 2019-05-08T13:28:24 | 171,547,670 | 0 | 0 | null | 2019-02-19T20:50:56 | 2019-02-19T20:50:56 | null | UTF-8 | Python | false | false | 25,766 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import scipy.io as sio
import argparse
import os
import json
import glob
import random
import collections
import math
import time
from ops import *
from model_sGRL_No... | [
"jordi.puyoles.calafell@gmail.com"
] | jordi.puyoles.calafell@gmail.com |
164097886c1763fa882e36260fc4dd6d31deb96b | f291410c0162cb976e9b42c3ff5108bff9e4498a | /operators/position_suzanne.py | 001dde4c5d10ecfaddad19dfa28b4fa09a7ce878 | [] | no_license | PawitraStudio/PSTools | 03f20897ed3498f978621c25ad78ddd30b21db92 | a34d15f6ab93697e4a5f3087970f544fcfa270a2 | refs/heads/master | 2021-06-04T06:17:21.835779 | 2018-11-07T05:47:44 | 2018-11-07T05:47:44 | 57,173,184 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 836 | py | import bpy
class KMSPositionedSuzanne(bpy.types.Operator):
'Adjust monkey to sit on the ground'
bl_idname = 'ps.position_suz'
bl_label = 'Suzanne Sit'
@classmethod
def poll(cls, context):
return (context.mode == 'OBJECT')
def execute(self, context):
cloc = bpy.context.scene.cu... | [
"aditia.ap@gmail.com"
] | aditia.ap@gmail.com |
cf13e49e8f4465317d1b5cc42220f8382bb2ab6b | 04809a3617564ec5ce3251e1603fb99252ff1d88 | /Assignment 1.py | 59315cb28ac36f7ecd08bc24dcc8f0bc64acffa3 | [] | no_license | keshavshah2196/Consultadd | e1ce4e0b16dcbc3744b2a24eb80034f3b06a20f5 | 51f59acba33c72b8e1891cba353215951f76e502 | refs/heads/master | 2022-07-14T16:44:22.020502 | 2020-05-15T00:34:49 | 2020-05-15T00:34:49 | 263,134,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,265 | py | #Q1
print("Q1")
a,b,c=5,7,"Ktsh"
print("a=",a)
print("b=",b)
print("c=",c)
print("_-----")
#Q2
print("Q2")
p=8+9j
q=67
print("Elements before swapping",p,q)
p,q=q,p
print("Elemens after swappind",p,q)
print("------")
#Q3
print("Q3")
d=46
f=7/5
print("Original values")
print("d=",d,"f=",f)
t... | [
"noreply@github.com"
] | keshavshah2196.noreply@github.com |
7052ee3967aad693dfc6f1cd72bf9eb072dfe7e9 | 850915135e59bf50efdaa02c2d13990529557daf | /models/__init__.py | ef9be443229d80b11727e20146d8f93b9715f1b7 | [
"MIT"
] | permissive | VamshiTeja/SMDL | 9ab387a439f9ae5521273640b3835a1eb897258a | 0dda36df9d0f2f921f365cc644f61dd81798693c | refs/heads/master | 2022-11-29T09:23:39.755149 | 2020-11-27T08:54:57 | 2020-11-27T08:54:57 | 154,336,728 | 20 | 8 | MIT | 2022-11-22T03:14:42 | 2018-10-23T13:52:05 | Python | UTF-8 | Python | false | false | 101 | py | from .resnet import *
from .SimpleNet import *
from .imagenet_resnet import resnet34, resnet18_ILSVRC | [
"josephkj20@gmail.com"
] | josephkj20@gmail.com |
ea1ab922b20fdef95fef88c09c6746131b654f70 | c174107bfe612602658ef7bce64983b04602c92f | /ConfidenceDM/decision_model.py | d087eee1dfe144ef629f3a2b07a52e3e0aef72bc | [] | no_license | lucianopaz/unknownVarianceInferenceModel | eda0c50aa9c090c060032546cd0a36af3fdaf0db | 887ef82556dddd330e30752355c3464fde8638c4 | refs/heads/master | 2018-09-10T12:08:32.464708 | 2018-06-05T10:02:17 | 2018-06-05T10:02:17 | 76,459,305 | 0 | 1 | null | 2017-02-15T13:59:38 | 2016-12-14T12:51:21 | Python | UTF-8 | Python | false | false | 39,390 | py | #!/usr/bin/python
#-*- coding: UTF-8 -*-
"""
Decision Model package
Defines the DecisionModel class, which computes the decision bounds,
belief values, maps belief and accumulated evidence, computes first
passage time probability distributions, convolutions with non-decision
time and belief to confidence mappings. Th... | [
"chulo1787@gmail.com"
] | chulo1787@gmail.com |
207c2c9724fd0274e408dc29c05b801c94a3e1be | 262c70153995349ccb80fb3f4a6e9a85c4495d9b | /web/turk/catalog/migrations/0007_auto_20171122_2107.py | 06cdf3ecb182099aa49a8867767be458600ed857 | [] | no_license | nghiank/rec_table | 2ec43bc673a731e13daf5b69f9cce6be4b295bb6 | d0f25716b932cc01a57fb476898b2fd297b7e227 | refs/heads/master | 2022-04-30T04:05:54.316739 | 2022-03-27T20:20:01 | 2022-03-27T20:20:01 | 100,076,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-22 21:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0006_auto_20171107_1502'),
]
operations = [
migrations.AddField(... | [
"nghiank@hotmail.com"
] | nghiank@hotmail.com |
bb78898b6eaa938bae587f12df5d3feac094861e | 52a023aee8818c6b1fa8316ff0b6ab83ed00d211 | /aircraft/aircraft.py | 43864d8bc7bbc278a71112cfdd1efe6e5eb17f7b | [
"MIT"
] | permissive | 6110-CTO/piawaredump1090wrapper | 9092c1aa3d237b55ec437620d328df57f774b71c | c7cc1570a797f12b00908e2e49eb7fd2954f3752 | refs/heads/master | 2023-06-21T19:50:05.363966 | 2020-04-13T21:35:46 | 2020-04-13T21:35:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,601 | py | from .calculate_distance_of_aircraft import calculate_distance_of_aircraft
from .exceptions import NotofTypeFloat, IncorrectDeltaCalculation, IncorrectLngLat
class Aircraft:
"""
Airacraft class containg information regarding a single aircraft.
Some notes about arugments:
Note: maybe we can make ... | [
"kc8@users.noreply.github.com"
] | kc8@users.noreply.github.com |
c709c9a204f4ac884ebdf50acfacc83a34d4793a | f1878806a8787d607705158906a830b06f7cdcf8 | /tests/utils/tensorflow/test_data_generator.py | 7f92f97cd90ce2dadde295e564267079afde9480 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | 2boloto/rasa | 58c1511c2bbc98e8b15900bd011a6f4d0dcf1d81 | 6a73b2e799b495411af46230dbc02f5edec3741c | refs/heads/main | 2023-04-11T03:42:24.370663 | 2021-04-29T15:55:40 | 2021-04-29T15:55:40 | 362,908,820 | 1 | 1 | Apache-2.0 | 2021-04-29T18:19:04 | 2021-04-29T18:19:03 | null | UTF-8 | Python | false | false | 6,496 | py | import pytest
import scipy.sparse
import numpy as np
from rasa.utils.tensorflow.model_data import FeatureArray, RasaModelData
from rasa.utils.tensorflow.data_generator import (
RasaDataGenerator,
RasaBatchDataGenerator,
)
def test_data_generator_with_increasing_batch_size(model_data: RasaModelData):
epo... | [
"noreply@github.com"
] | 2boloto.noreply@github.com |
41f27f6cf3509d3cdac25470365372a01d6a6123 | ffdea80b45e9c86abde16bf77c05589b1901d64f | /froide_exam/__init__.py | e9ae091b0acbcbf56486c18daf32536a8c039176 | [
"MIT"
] | permissive | okfde/froide-exam | 081315f061d54969ad2441c8411f7e8a8915ae81 | 1f7baf4c2e72a623e17962d111efcd9dbf3ad875 | refs/heads/main | 2023-01-28T16:13:23.636740 | 2023-01-24T17:38:51 | 2023-01-24T17:38:51 | 159,523,223 | 2 | 1 | MIT | 2023-01-23T16:48:07 | 2018-11-28T15:26:41 | Python | UTF-8 | Python | false | false | 79 | py | __version__ = '0.0.1'
default_app_config = 'froide_exam.apps.FroideExamConfig'
| [
"12673799+krmax44@users.noreply.github.com"
] | 12673799+krmax44@users.noreply.github.com |
f589c68eff5b987ab19d8b991f42b49334791897 | 3a913e87c7301b43c995482246394efac042db26 | /venv/bin/pip3.7 | 0ad8aedd5f40a6cbf006c1c23103341bdc0b77bd | [] | no_license | ananthgoyal/Raga_Indentification | bdf1119f3672cb0ccc6707ff5a31e387b5aa9449 | 40276340be12a1b62e2fca4d4bc2ae1f7e6a0fcc | refs/heads/master | 2023-02-06T11:00:48.431506 | 2020-12-28T21:32:50 | 2020-12-28T21:32:50 | 324,671,425 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 426 | 7 | #!/Users/ananthgoyal/PycharmProjects/Raga_Indentification/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', ''... | [
"ananthgoyal@gmail.com"
] | ananthgoyal@gmail.com |
8e532955036b1f55a5d628d121dbb98e2d470b75 | b0ad03dc1ad141ef9d669758e6f295787b71a721 | /api/server.py | c87aee62570101ef9d27226fda49a110d0c0b796 | [] | no_license | AlecAivazis/recipeBook | 5e375fd01813a19eb15f3e74033211ba685b4b74 | 92522c5d678b85b9f03c7d8815c765dcbf30f911 | refs/heads/master | 2023-03-12T14:15:59.887428 | 2017-12-18T02:01:36 | 2017-12-18T02:01:36 | 52,736,616 | 0 | 4 | null | 2017-12-18T02:01:37 | 2016-02-28T18:33:32 | Python | UTF-8 | Python | false | false | 298 | py | # external imports
import nautilus
# create a nautilus service with just the schema
class RecipeBookAPI(nautilus.APIGateway):
@nautilus.auth_criteria('recipe')
async def auth_recipe(self, model, user_id):
# only recipes with id 2 are visible
return await model._has_id(2)
| [
"alec@aivazis.com"
] | alec@aivazis.com |
955c655db3b4b204697aa1b3c2295968e255b9a7 | 7d0c6df6480402642a327b1e6bca353047cea444 | /app/.~c9_invoke_NNKGkQ.py | 550f3e20837a23b76f47741511c1cb799a97820a | [] | permissive | HaywardPeirce/battlesnake | b7ab99016ea9d624e71c1969cfb1e56d0e9bcf5c | 759c399c60a1f292a621dc276cb1a02f164e1134 | refs/heads/master | 2020-04-21T04:37:02.342034 | 2019-02-13T05:28:37 | 2019-02-13T05:28:37 | 169,317,516 | 1 | 0 | MIT | 2019-02-13T05:28:38 | 2019-02-05T21:40:48 | Python | UTF-8 | Python | false | false | 16,102 | py | from battlesnakeClasses import *
import random, math
#import each of the component files running sections of the snake
#check if squatchy will hit himself
def squatchyHitCheck(squatchy, score):
#get current squatchy head location
print("------------------------------------------------")
print("Checking wh... | [
"noreply@github.com"
] | HaywardPeirce.noreply@github.com |
47d46c7d33dabb7020a5068dbdaaf4be937aceac | fb9371054b6ce236c6b202cc51c6bc98a3483060 | /Python_code/温度转换.py | 140faf39bf17196b0dd75cfc0e3cf9b6cc6990b5 | [] | no_license | skymoonfp/python_learning | 621d5e72c5b356fd507e4a00c463ea8d565588fb | 1e8340303809d8c7c3af3201084b158c1784f22e | refs/heads/master | 2020-06-04T10:07:27.009212 | 2019-06-19T13:52:44 | 2019-06-19T13:52:44 | 191,978,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | # TempConvert.py
for i in range(3):
val = input("请输入带温度表示符号的温度值(例如:32C):")
if val[-1] in ['C', 'c']:
f = 1.8 * float(val[0:-1]) + 32
print("转换后的温度为:%.2fF" % f)
elif val[-1] in ['F', 'f']:
c = (float(val[0:-1]) - 32) / 1.8
print("转换后的温度为:%.2fC" % c)
else:
print("输... | [
"954918@qq.com"
] | 954918@qq.com |
abf2922e39479afdfe5a6e1d45f967bfc3638731 | aec4af85df25a0ddda5d67fdf29299e0831a6233 | /controller/auth_decorator.py | 4c0e3d112e80133110c73144092d07ae13de45b1 | [] | no_license | charliebrown314/StartupCentral | 9068875cb0c1288b2ed8b05ef153051316115032 | d5c22be1d565a3b5bcfe2a8993541b589d92da61 | refs/heads/master | 2023-01-02T21:15:09.520376 | 2020-10-25T13:57:47 | 2020-10-25T13:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 869 | py | from flask import session
from functools import wraps
def login_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
user = dict(session).get('profile', None)
# You would add a check here and usethe user id or something to fetch
# the other data for that user/check if they e... | [
"jmacias@buffalo.edu"
] | jmacias@buffalo.edu |
c40701fb8d96eab1d4aaa9bee3007096c7172f85 | 7310939920afe496c04b955f0f27635ea7d5336d | /lists/migrations/0003_list.py | 1ec3b29a4b30595a91697a574afba98e9e9c41fd | [] | no_license | liuxscn/superlists_dev | d0948c33b9652f0694a6934de45de4d2c5c8b4c1 | dd58546751f82e83fe363f0c4e8a80d37423371e | refs/heads/master | 2021-06-19T11:04:02.701819 | 2019-06-26T09:19:59 | 2019-06-26T09:19:59 | 186,582,675 | 0 | 0 | null | 2021-06-10T21:28:07 | 2019-05-14T08:48:33 | JavaScript | UTF-8 | Python | false | false | 507 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2019-05-06 11:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lists', '0002_item_text'),
]
operations = [
migrations.CreateModel(
... | [
"emlliuxiang@126.com"
] | emlliuxiang@126.com |
59e7790c6c4ef66d796b0e1c45ec5b6d63f65425 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_055/ch164_2020_06_15_19_30_32_293205.py | ac84822dea86b620649440fd541237100d42a2d1 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | def traduz(words, eng2port):
palavras = []
for word in words:
for ing, port in eng2port.items():
if word == ing:
palavras.append(port)
return palavras
| [
"you@example.com"
] | you@example.com |
e2434f40a00d22e0c2f82535ba496a02aa1cc1a5 | 714537c7579a79dcd1a3337de12d183e7bbdb103 | /data_operation/augmentation/mosaic_instance_coco.py | 170079e32533f8ea9232a5035733f3c1928b8fee | [
"MIT"
] | permissive | lyw615/code_accumulation | 5cfba3260bcd53a191886f57770c5fcaa34dad0b | 5b2a5c039a725def37e19f226906ed1087880118 | refs/heads/main | 2023-09-06T03:58:12.907777 | 2021-11-16T04:07:52 | 2021-11-16T04:07:52 | 366,018,841 | 3 | 0 | MIT | 2021-11-16T04:07:53 | 2021-05-10T11:26:53 | Python | UTF-8 | Python | false | false | 28,635 | py | import sys,os
file_path = os.path.abspath(__file__)
sys.path.append(os.path.abspath(os.path.join(file_path, "..", "..","..", "..")))
from code_aculat.visualize.visual_base import draw_multi_bboxes
import numpy as np
import json,copy
import cv2 as cv
from PIL import Image,ImageDraw
import random
import matplotlib.pyplo... | [
"shwwgrshbd@qq.com"
] | shwwgrshbd@qq.com |
3c6c662ac03d2f07a98ed0f8b23024a2730b8ee7 | dbc60695216bcb29feeb6b383f7acef045853363 | /train.py | 49c2649408d2073c82ca5ccb52fd6eec241f8ea6 | [] | no_license | Hauf3n/Categorical-DQN-Atari-PyTorch | c0e4e173664a52b9b89adedd21f30adf24b09621 | aed0e99b1f1648667442aad33240075af7ac4b96 | refs/heads/master | 2022-12-11T12:30:48.912889 | 2020-09-14T15:56:22 | 2020-09-14T15:56:22 | 260,343,819 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,203 | py | import argparse
import numpy as np
import gym
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import time
import random
import os
from Agents import C51_Agent
from Atari_Wrapper import Atari_Wrapper
from Env_Runner import Env_Runner
from Experience_Replay import Experienc... | [
"53398268+Hauf3n@users.noreply.github.com"
] | 53398268+Hauf3n@users.noreply.github.com |
cfae4a8360740edba9366fc11b72439016faa4be | 5960271837100a5008870fb05300d75a9230f56d | /test-scripts/completeTest.py | 7b5acb01f0e6d443542e35cc511f87ebe9b23f33 | [
"MIT"
] | permissive | speakerbug/ChristmasPi | 3f55fd660911a831054860d79216559f13b49d39 | 9277b19047b2b3fa8beb39d0251fa53607c58998 | refs/heads/master | 2021-01-19T02:48:17.659593 | 2016-06-16T23:09:15 | 2016-06-16T23:09:15 | 46,230,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,300 | py | import RPi.GPIO as GPIO, time
one = 11
two = 12
three = 13
four = 15
five = 16
six = 18
seven = 22
eight = 7
nine = 29
ten = 31
eleven = 32
twelve = 33
fastspeed = 0.2
slowspeed = 2.0
GPIO.setmode(GPIO.BOARD)
print("Getting Started")
time.sleep(fastspeed)
print("Turning on 1")
GPIO.setup(one, GPIO.OUT)
GPIO.output(... | [
"henry@henrysaniuk.com"
] | henry@henrysaniuk.com |
52f77928fb0b623c06887de428aff8930460aeee | cac5c013d2ec78bb291b9c023987c215f6979799 | /magic/python/tcpClient.py | 4943a0b5a087290183191bfa2e66cf2c6bada85e | [] | no_license | elitecodegroovy/MagicPython | 94dc9f55bee699ef978bcd8de72488042a836f59 | 7ef6ffc059c042ab1c81185b4b69ecfbeb794a0d | refs/heads/master | 2021-01-22T20:44:20.322734 | 2015-04-10T07:19:24 | 2015-04-10T07:19:24 | 8,220,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | __author__ = 'JohnLiu'
from socket import *
HOST = 'localhost'
PORT = 21567
BUFSIZ = 1024
ADDR = (HOST, PORT)
tcpCliSock = socket(AF_INET, SOCK_STREAM)
tcpCliSock.connect(ADDR)
while True:
data = raw_input('> ')
if not data:
break
tcpCliSock.send(data)
data = tcpCliSock.recv(BUFSIZ)
if no... | [
"elite_jigang@163.com"
] | elite_jigang@163.com |
07df02977d52ce2be8857d94da104372134c3813 | fd64e364368bcb2cdcf77ab1e0fc234a6b698f69 | /Python/PERFCONT.py | 43eb9b9989a3d5b14e0e975b890428725a70f37f | [] | no_license | Parizval/CodeChefCodes | 57712069f3d56cc42282f9e35c6ddd9398e4a5bf | cfd2876816be806882650b6ea51431b1f8d6bec5 | refs/heads/master | 2021-07-16T13:10:15.668713 | 2020-07-06T21:40:09 | 2020-07-06T21:40:09 | 188,693,667 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | for a in range(int(input())):
n,p = map(int,input().split())
val = list(map(int,input().split()))
cakewalk = 0
hard = 0
for i in val :
if i >= p //2 :
cakewalk += 1
elif i <= p // 10 :
hard += 1
if cakewalk > 1 and hard > 3 :
break
... | [
"anmolgoyal@gmail.com"
] | anmolgoyal@gmail.com |
b73e2bb9b0234950feed26a11ecc351761a01508 | be19bb8435a33965682571cb7a286f728d27cfe9 | /Main2.py | c3d4684ae1ddd7d2d83474123055b89a9b0b9a4d | [] | no_license | Papyrosaurus/Aprrendre_python | 0b1c83c19aaf7315ec06f30bc0c79a35fd9754ac | c80ea2de3408c9466454a5a0e2183981f77eb2c4 | refs/heads/main | 2022-12-09T15:16:22.949442 | 2022-11-24T15:14:38 | 2022-11-24T15:14:38 | 257,275,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22 | py | #Exercice day 001-002
| [
"59684985+Papyrosaurus@users.noreply.github.com"
] | 59684985+Papyrosaurus@users.noreply.github.com |
c783c7ed8acee2bf4687d046333989bc8c85a5fb | 7974cd9076dcd50f52f16ce618d94c14de36674d | /saved/_vim.py | df4ee182f5f1e48cf3919047b1d7c56746a949c6 | [] | no_license | grant-h/vocode | 501f78ed72595cfa43ee186a4875ad855ce7483b | c35e90b29eb5a203fc01d85ab1547cff31fc5bb9 | refs/heads/master | 2021-01-11T18:48:19.297703 | 2017-01-22T17:47:55 | 2017-01-22T17:47:55 | 79,630,403 | 2 | 1 | null | 2017-01-22T07:10:39 | 2017-01-21T07:15:08 | Python | UTF-8 | Python | false | false | 487 | py | from dragonfly import *
# modes
# 0 - normal
# 1 - insert
# 2 - visual
mode = 0
grammar = Grammar("vim_example")
ex_rule = MappingRule(
name="insert",
mapping={
"insert mode": Key("I"),
"select all text": Key("g, g, V, G"),
"undo": Key("u"),
"redo": Key("c-r"),
"escape" : Key("escape"),
"... | [
"elanrasabi80@gmail.com"
] | elanrasabi80@gmail.com |
4a3a7618fb14017d8c2c38dfba10422ff2fa9bb2 | 999d971820020a50e1a13046c4df255c71f0f5f9 | /Week 6/richTask 6/redoingStaticEquilibrium.py | f843efd2c851d8f50631498fd15f524c8560bdee | [] | no_license | kelvincaoyx/UTEA-PYTHON | 062019f1ea79b98ee8a5f1ecf41d0fdda27cabda | 65891610cc2ca1f662082785eb44eac1368ccc8e | refs/heads/master | 2023-07-08T02:57:30.991448 | 2021-08-13T01:34:02 | 2021-08-13T01:34:02 | 382,920,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,125 | py | '''
This program is used to help the user practice calculating net torque
and estimating which direction the metre stick is going to tip
'''
#importing the random library to get random number generator
import pyfiglet
import math
from library import cls
from library import randomDigit
#function that generates a list ... | [
"kelvincaoyx@gmail.com"
] | kelvincaoyx@gmail.com |
fdf3e8e89abd0314c8aaf816005a86c63aa0ef28 | 25ea73671a2556652afb7805bc164adaff2f1cee | /sigecc/settings.py | d0bc282182f177dc5f6683ab172c8c9b6043eb67 | [] | no_license | lyralemos/sigecc | 852857c63b5b81782b6208faefa1cc93e2656c3b | c90bed4a3e40f1cdf89a3a7cbcf450bec9d9d859 | refs/heads/master | 2022-12-15T11:15:49.254269 | 2019-05-23T11:46:33 | 2019-05-23T11:46:33 | 138,098,152 | 0 | 0 | null | 2022-12-08T05:41:22 | 2018-06-20T23:59:06 | Vue | UTF-8 | Python | false | false | 4,675 | py | """
Django settings for sigecc project.
Generated by 'django-admin startproject' using Django 2.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
# ... | [
"lyralemos@gmail.com"
] | lyralemos@gmail.com |
4dda8de1c3e32995b1e0f278b75c069fe523ad7b | ce074998469af446e33d0fab7adb01320ccc77ed | /src_procedures/Winlogon Userinit Key Persistence- PowerShell.py | c5c9fac1511cb362c646b704a32ea46482bba7dd | [] | no_license | parahaoer/detection_rules | 1341063568b0ccfa180da129a29aeec0a62e679e | c9f3408eccbcb4b61d1d441af31839872f9bb26c | refs/heads/master | 2023-02-09T13:54:40.254874 | 2020-12-28T09:25:31 | 2020-12-28T09:25:31 | 265,990,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,576 | py | from elasticsearch import Elasticsearch
es = Elasticsearch('10.25.23.161:9200')
doc = {
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [
{
"match_phrase": {
"event_id": "4104"
}
},
{
... | [
"33771109+parahaoer@users.noreply.github.com"
] | 33771109+parahaoer@users.noreply.github.com |
a91769c383e39d1b234b1d9b68cefbe2d29c1618 | 143bccd5ca0aefed912bdeefe353a6a3382ba55e | /Unideadline/settings.py | e9eb022be01b2b4e37f51a49931d0fc16c150068 | [
"MIT"
] | permissive | marvinguelzow/Unideadline | aacc049999d8c71f04fc682e30fd4d0ae2087ffa | 4abbb1109cb9cc0f7cbbcf744683c7ab486e716a | refs/heads/master | 2021-05-28T05:34:30.146237 | 2015-03-13T18:54:01 | 2015-03-13T18:54:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,073 | py | """
Django settings for Unideadline project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...... | [
"marvinguelzow@googlemail.com"
] | marvinguelzow@googlemail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.